Class: RCharts::Type::Symbol
- Inherits:
-
ActiveModel::Type::Value
- Object
- ActiveModel::Type::Value
- RCharts::Type::Symbol
- Includes:
- ActiveModel::Type::Helpers::Immutable
- Defined in:
- lib/rcharts/type/symbol.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#serialize(value) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/rcharts/type/symbol.rb', line 12 def serialize(value) case value when ::String then value.to_sym else super.to_sym end end |
#type ⇒ Object
8 9 10 |
# File 'lib/rcharts/type/symbol.rb', line 8 def type :symbol end |