Class: Cadooz::Immutable::GreetingCard
- Inherits:
-
Object
- Object
- Cadooz::Immutable::GreetingCard
- Includes:
- Mixins
- Defined in:
- lib/cadooz/models/immutable/greeting_card.rb
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(open_struct) ⇒ GreetingCard
constructor
A new instance of GreetingCard.
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
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
4 5 6 |
# File 'lib/cadooz/models/immutable/greeting_card.rb', line 4 def subject @subject end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/cadooz/models/immutable/greeting_card.rb', line 4 def text @text end |