Class: Config::Section
- Inherits:
-
Struct
- Object
- Struct
- Config::Section
- Defined in:
- lib/config.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
21 22 23 |
# File 'lib/config.rb', line 21 def name @name end |
Class Method Details
.normalize(name) ⇒ Object
22 23 24 25 |
# File 'lib/config.rb', line 22 def self.normalize(name) return [] if name.empty? [name.first.downcase, name.drop(1).join(".")] end |
Instance Method Details
#headling_line ⇒ Object
27 28 29 30 31 |
# File 'lib/config.rb', line 27 def headling_line line = "[#{ name.first }" line.concat(%' "#{ name.drop(1).join(".") }"') if name.size > 1 line.concat("]\n") end |