Class: ActiveColumn::KeyConfig
- Defined in:
- lib/active_column/key_config.rb
Instance Attribute Summary collapse
-
#func ⇒ Object
Returns the value of attribute func.
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key, options) ⇒ KeyConfig
constructor
A new instance of KeyConfig.
- #to_s ⇒ Object
Constructor Details
#initialize(key, options) ⇒ KeyConfig
Returns a new instance of KeyConfig.
6 7 8 9 |
# File 'lib/active_column/key_config.rb', line 6 def initialize(key, ) @key = key @func = [:values] || key end |
Instance Attribute Details
#func ⇒ Object
Returns the value of attribute func.
4 5 6 |
# File 'lib/active_column/key_config.rb', line 4 def func @func end |
#key ⇒ Object
Returns the value of attribute key.
4 5 6 |
# File 'lib/active_column/key_config.rb', line 4 def key @key end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/active_column/key_config.rb', line 11 def to_s "KeyConfig[#{key}, #{func or '-'}]" end |