Class: Rticles::Numbering::Config
- Inherits:
-
Object
- Object
- Rticles::Numbering::Config
- Defined in:
- lib/rticles/numbering.rb
Defined Under Namespace
Classes: LevelConfig
Instance Attribute Summary collapse
-
#innermost_only ⇒ Object
Returns the value of attribute innermost_only.
-
#separator ⇒ Object
Returns the value of attribute separator.
Instance Method Summary collapse
- #[](level) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
23 24 25 26 |
# File 'lib/rticles/numbering.rb', line 23 def initialize self.separator = '.' @level_configs = [] end |
Instance Attribute Details
#innermost_only ⇒ Object
Returns the value of attribute innermost_only.
21 22 23 |
# File 'lib/rticles/numbering.rb', line 21 def innermost_only @innermost_only end |
#separator ⇒ Object
Returns the value of attribute separator.
21 22 23 |
# File 'lib/rticles/numbering.rb', line 21 def separator @separator end |
Instance Method Details
#[](level) ⇒ Object
28 29 30 |
# File 'lib/rticles/numbering.rb', line 28 def [](level) @level_configs[level] ||= LevelConfig.new end |