Class: SBConstants::Section
- Inherits:
-
Struct
- Object
- Struct
- SBConstants::Section
- Defined in:
- lib/sbconstants/section.rb
Instance Attribute Summary collapse
-
#constants ⇒ Object
Returns the value of attribute constants.
-
#locations ⇒ Object
Returns the value of attribute locations.
Instance Method Summary collapse
Instance Attribute Details
#constants ⇒ Object
Returns the value of attribute constants
2 3 4 |
# File 'lib/sbconstants/section.rb', line 2 def constants @constants end |
#locations ⇒ Object
Returns the value of attribute locations
2 3 4 |
# File 'lib/sbconstants/section.rb', line 2 def locations @locations end |
Instance Method Details
#pretty_title ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/sbconstants/section.rb', line 4 def pretty_title title = locations.map(&:key_path).join('') .gsub(".", "") .gsub(" ", "") .gsub("identifier", "Identifier") .gsub("viewcontroller", "ViewController") .gsub("storyboard", "Storyboard") title.slice(0,1).capitalize + title.slice(1..-1) end |