Class: Fino::Definition::Section
- Inherits:
-
Object
- Object
- Fino::Definition::Section
- Defined in:
- lib/fino/definition/section.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(name:, **options) ⇒ Section
constructor
A new instance of Section.
- #label ⇒ Object
Constructor Details
#initialize(name:, **options) ⇒ Section
Returns a new instance of Section.
6 7 8 9 |
# File 'lib/fino/definition/section.rb', line 6 def initialize(name:, **) @name = name @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/fino/definition/section.rb', line 4 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/fino/definition/section.rb', line 4 def @options end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
15 16 17 |
# File 'lib/fino/definition/section.rb', line 15 def eql?(other) self.class.eql?(other.class) && name == other.name end |
#hash ⇒ Object
20 21 22 |
# File 'lib/fino/definition/section.rb', line 20 def hash name.hash end |
#label ⇒ Object
11 12 13 |
# File 'lib/fino/definition/section.rb', line 11 def label .fetch(:label, name.to_s.capitalize) end |