Module: Lycra::Serializer
- Defined in:
- lib/lycra/serializer.rb,
lib/lycra/serializer/model.rb
Defined Under Namespace
Modules: Model
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/lycra/serializer.rb', line 3 def self.included(base) base.send :include, Attributes base.send :extend, Inheritance base.send :alias_method, :serialize!, :resolve! base.class_eval do class << self alias_method :serialize!, :resolve! end end end |
Instance Method Details
#as_json(options = {}) ⇒ Object
15 16 17 |
# File 'lib/lycra/serializer.rb', line 15 def as_json(={}) serialize!(subject).as_json() end |