Class: ActiveRecord::Type::Set
- Inherits:
-
Type::Value
- Object
- Type::Value
- ActiveRecord::Type::Set
- Defined in:
- lib/activerecord_enum/activerecord_enum_post42.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Set
constructor
A new instance of Set.
- #type ⇒ Object
- #type_cast_from_database(value) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Set
Returns a new instance of Set.
53 54 55 56 |
# File 'lib/activerecord_enum/activerecord_enum_post42.rb', line 53 def initialize( = {}) .assert_valid_keys(:limit) @limit = [:limit] end |
Instance Method Details
#type ⇒ Object
49 50 51 |
# File 'lib/activerecord_enum/activerecord_enum_post42.rb', line 49 def type :set end |
#type_cast_from_database(value) ⇒ Object
58 59 60 |
# File 'lib/activerecord_enum/activerecord_enum_post42.rb', line 58 def type_cast_from_database(value) value.split(",") end |