Class: Virtus::Attributes::String
- Defined in:
- lib/virtus/attributes/string.rb
Constant Summary
Constants inherited from Attribute
Attribute::DEFAULT_ACCESSOR, Attribute::OPTIONS
Instance Attribute Summary
Attributes inherited from Attribute
#instance_variable_name, #model, #name, #options, #reader_visibility, #writer_visibility
Instance Method Summary collapse
Methods inherited from Attribute
#_create_reader, #_create_writer, accept_options, accepted_options, #complex?, descendants, #get, #get!, inherited, #initialize, options, #primitive?, #set, #set!, #typecast
Constructor Details
This class inherits a constructor from Virtus::Attributes::Attribute
Instance Method Details
#typecast_to_primitive(value, model = nil) ⇒ Object
6 7 8 |
# File 'lib/virtus/attributes/string.rb', line 6 def typecast_to_primitive(value, model = nil) value.to_s end |