Class: SolidusSubscriptions::ChurnBuster::Serializer
- Inherits:
-
Object
- Object
- SolidusSubscriptions::ChurnBuster::Serializer
- Defined in:
- lib/solidus_subscriptions/churn_buster/serializer.rb
Direct Known Subclasses
OrderSerializer, SubscriptionCustomerSerializer, SubscriptionPaymentMethodSerializer, SubscriptionSerializer
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(object) ⇒ Serializer
constructor
A new instance of Serializer.
- #to_h ⇒ Object
Constructor Details
#initialize(object) ⇒ Serializer
Returns a new instance of Serializer.
14 15 16 |
# File 'lib/solidus_subscriptions/churn_buster/serializer.rb', line 14 def initialize(object) @object = object end |
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
6 7 8 |
# File 'lib/solidus_subscriptions/churn_buster/serializer.rb', line 6 def object @object end |
Class Method Details
.serialize(object) ⇒ Object
9 10 11 |
# File 'lib/solidus_subscriptions/churn_buster/serializer.rb', line 9 def serialize(object) new(object).to_h end |
Instance Method Details
#to_h ⇒ Object
18 19 20 |
# File 'lib/solidus_subscriptions/churn_buster/serializer.rb', line 18 def to_h raise NotImplementedError end |