Class: Odca::ParentfulOverlay
- Inherits:
-
Object
- Object
- Odca::ParentfulOverlay
- Extended by:
- Forwardable
- Defined in:
- lib/odca/parentful_overlay.rb
Instance Attribute Summary collapse
-
#overlay ⇒ Object
readonly
Returns the value of attribute overlay.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(parent:, overlay:) ⇒ ParentfulOverlay
constructor
A new instance of ParentfulOverlay.
- #to_h ⇒ Object
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(parent:, overlay:) ⇒ ParentfulOverlay
Returns a new instance of ParentfulOverlay.
11 12 13 14 |
# File 'lib/odca/parentful_overlay.rb', line 11 def initialize(parent:, overlay:) @parent = parent @overlay = end |
Instance Attribute Details
#overlay ⇒ Object (readonly)
Returns the value of attribute overlay.
7 8 9 |
# File 'lib/odca/parentful_overlay.rb', line 7 def @overlay end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
7 8 9 |
# File 'lib/odca/parentful_overlay.rb', line 7 def parent @parent end |
Instance Method Details
#to_h ⇒ Object
20 21 22 23 24 |
# File 'lib/odca/parentful_overlay.rb', line 20 def to_h { schema_base: parent_id }.merge( .to_h ) end |
#to_json(options = {}) ⇒ Object
16 17 18 |
# File 'lib/odca/parentful_overlay.rb', line 16 def to_json( = {}) to_h.to_json(*) end |