Class: Cascade::ColumnsMatching
- Inherits:
-
Object
- Object
- Cascade::ColumnsMatching
- Extended by:
- Configuration, Forwardable
- Defined in:
- lib/cascade/columns_matching.rb
Instance Method Summary collapse
-
#column_type(key) ⇒ Symbol
Presenter for passed key.
-
#initialize(options = {}) ⇒ ColumnsMatching
constructor
A new instance of ColumnsMatching.
-
#supported_keys ⇒ Array
Defines set of possible keys that can be used for iterating through parsed line.
Methods included from Configuration
Constructor Details
#initialize(options = {}) ⇒ ColumnsMatching
Returns a new instance of ColumnsMatching.
15 16 17 18 |
# File 'lib/cascade/columns_matching.rb', line 15 def initialize( = {}) @filepath = [:filepath] @content = .fetch(:content) { parse_content_file } end |
Instance Method Details
#column_type(key) ⇒ Symbol
Presenter for passed key
31 32 33 |
# File 'lib/cascade/columns_matching.rb', line 31 def column_type(key) @content[key].to_sym end |
#supported_keys ⇒ Array
Defines set of possible keys that can be used for iterating through parsed line
24 25 26 |
# File 'lib/cascade/columns_matching.rb', line 24 def supported_keys @supported_keys ||= @content.keys end |