Class: Cadooz::Immutable::GreetingCard

Inherits:
Object
  • Object
show all
Includes:
Mixins
Defined in:
lib/cadooz/models/immutable/greeting_card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Mixins

#cadooz_class, #default_value_for_nil, #instance_variables_empty?, #serialize

Constructor Details

#initialize(open_struct) ⇒ GreetingCard

Returns a new instance of GreetingCard.



6
7
8
9
10
11
# File 'lib/cadooz/models/immutable/greeting_card.rb', line 6

def initialize(open_struct)
  @subject = open_struct&.subject
  @text = open_struct&.text

  self.freeze
end

Instance Attribute Details

#subjectObject (readonly)

Returns the value of attribute subject.



4
5
6
# File 'lib/cadooz/models/immutable/greeting_card.rb', line 4

def subject
  @subject
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/cadooz/models/immutable/greeting_card.rb', line 4

def text
  @text
end