Module: StepUp::ConfigSectionsExt

Defined in:
lib/step-up/config.rb

Instance Method Summary collapse

Instance Method Details

#label(section) ⇒ Object



34
35
36
# File 'lib/step-up/config.rb', line 34

def label(section)
  labels[names.index(section)]
end

#labelsObject



26
27
28
# File 'lib/step-up/config.rb', line 26

def labels
  map{ |section| section.is_a?(String) ? to_label(section) : (section["label"] || to_label(section["name"])) }
end

#namesObject



18
19
20
# File 'lib/step-up/config.rb', line 18

def names
  map{ |section| section.is_a?(String) ? section : section["name"] }
end

#prefixesObject



22
23
24
# File 'lib/step-up/config.rb', line 22

def prefixes
  map{ |section| section.is_a?(String) ? to_prefix(section) : (section["prefix"] || to_prefix(section["name"])) }
end

#tag(section) ⇒ Object



38
39
40
# File 'lib/step-up/config.rb', line 38

def tag(section)
  tags[names.index(section)]
end

#tagsObject



30
31
32
# File 'lib/step-up/config.rb', line 30

def tags
  map{ |section| section.is_a?(String) ? to_tag(section) : (section["tag"] || to_tag(section["name"])) }
end