Class: SolidusSubscriptions::ChurnBuster::Serializer

Inherits:
Object
  • Object
show all
Defined in:
lib/solidus_subscriptions/churn_buster/serializer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#objectObject (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_hObject

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/solidus_subscriptions/churn_buster/serializer.rb', line 18

def to_h
  raise NotImplementedError
end