Module: Toy::Extensions::Set
- Included in:
- Set
- Defined in:
- lib/toy/extensions/set.rb
Instance Method Summary collapse
Instance Method Details
#from_store(value) ⇒ Object
14 15 16 |
# File 'lib/toy/extensions/set.rb', line 14 def from_store(value, *) value.nil? ? store_default : value.to_set end |
#store_default ⇒ Object
6 7 8 |
# File 'lib/toy/extensions/set.rb', line 6 def store_default [].to_set end |
#to_store(value) ⇒ Object
10 11 12 |
# File 'lib/toy/extensions/set.rb', line 10 def to_store(value, *) value.to_a end |