Module: CSVModel::Utilities::Options
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/csv_model/utilities.rb', line 7 def @options end |
Instance Method Details
#option(key, default = nil) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/csv_model/utilities.rb', line 9 def option(key, default = nil) value = .try(:[], key) value = .try(key) if value.nil? value = default if value.nil? value end |