Class: BMC::MiniModelSerializer::Serializer
- Inherits:
-
Serialize
- Object
- Serialize
- BMC::MiniModelSerializer::Serializer
show all
- Defined in:
- app/libs/bmc/mini_model_serializer/serializer.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m) ⇒ Object
12
13
14
15
16
17
18
|
# File 'app/libs/bmc/mini_model_serializer/serializer.rb', line 12
def method_missing(m, *)
if respond_to_missing?(m)
object.send(m, *)
else
super
end
end
|
Instance Method Details
#attributes ⇒ Object
2
3
4
|
# File 'app/libs/bmc/mini_model_serializer/serializer.rb', line 2
def attributes
raise NotImplementedError
end
|
#call ⇒ Object
6
7
8
|
# File 'app/libs/bmc/mini_model_serializer/serializer.rb', line 6
def call
serialize(attributes.index_with { |k| send(k) })
end
|