Class: Sheetah::TemplateConfig
- Inherits:
-
Object
- Object
- Sheetah::TemplateConfig
- Defined in:
- lib/sheetah/template_config.rb
Instance Attribute Summary collapse
-
#types ⇒ Object
readonly
Returns the value of attribute types.
Instance Method Summary collapse
- #header(key, index) ⇒ Object
-
#initialize(types: Types::Container.new) ⇒ TemplateConfig
constructor
A new instance of TemplateConfig.
Constructor Details
#initialize(types: Types::Container.new) ⇒ TemplateConfig
Returns a new instance of TemplateConfig.
7 8 9 |
# File 'lib/sheetah/template_config.rb', line 7 def initialize(types: Types::Container.new) @types = types end |
Instance Attribute Details
#types ⇒ Object (readonly)
Returns the value of attribute types.
11 12 13 |
# File 'lib/sheetah/template_config.rb', line 11 def types @types end |
Instance Method Details
#header(key, index) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/sheetah/template_config.rb', line 13 def header(key, index) header = key.to_s.capitalize header = "#{header} #{index + 1}" if index pattern = /^#{header}$/i [header, pattern] end |