Class: Codinginfo::Variant
Instance Method Summary collapse
- #cvars ⇒ Object
- #description ⇒ Object
-
#initialize(headers, row) ⇒ Variant
constructor
A new instance of Variant.
Constructor Details
#initialize(headers, row) ⇒ Variant
Returns a new instance of Variant.
39 40 41 |
# File 'lib/codinginfo.rb', line 39 def initialize(headers, row) @properties = headers.zip(row).to_h end |
Instance Method Details
#cvars ⇒ Object
43 44 45 46 47 |
# File 'lib/codinginfo.rb', line 43 def cvars @properties .select { |key, _| key.match?(/^CVAR_/) } .map { Cvar.new(name: _1, value: _2.to_i) } end |
#description ⇒ Object
49 |
# File 'lib/codinginfo.rb', line 49 def description = @properties[:swfk_id] |