Class: Hactor::HAL::Document
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Hactor::HAL::Document
- Defined in:
- lib/hactor/hal/document.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#resource_class ⇒ Object
readonly
Returns the value of attribute resource_class.
Instance Method Summary collapse
-
#initialize(body, options = {}) ⇒ Document
constructor
A new instance of Document.
- #root_resource ⇒ Object
Constructor Details
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
8 9 10 |
# File 'lib/hactor/hal/document.rb', line 8 def body @body end |
#resource_class ⇒ Object (readonly)
Returns the value of attribute resource_class.
8 9 10 |
# File 'lib/hactor/hal/document.rb', line 8 def resource_class @resource_class end |
Instance Method Details
#root_resource ⇒ Object
16 17 18 |
# File 'lib/hactor/hal/document.rb', line 16 def root_resource @root_resource ||= resource_class.new(body) end |