Class: Rticles::Numbering::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/rticles/numbering.rb

Defined Under Namespace

Classes: LevelConfig

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_onlyObject

Returns the value of attribute innermost_only.



21
22
23
# File 'lib/rticles/numbering.rb', line 21

def innermost_only
  @innermost_only
end

#separatorObject

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