Class: Mode::API::Link
- Inherits:
-
Object
- Object
- Mode::API::Link
- Defined in:
- lib/mode/api/link.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #expand(params = {}) ⇒ Object
- #href ⇒ Object
-
#initialize(content) ⇒ Link
constructor
A new instance of Link.
- #templated ⇒ Object
Constructor Details
#initialize(content) ⇒ Link
Returns a new instance of Link.
8 9 10 |
# File 'lib/mode/api/link.rb', line 8 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
6 7 8 |
# File 'lib/mode/api/link.rb', line 6 def content @content end |
Instance Method Details
#expand(params = {}) ⇒ Object
20 21 22 |
# File 'lib/mode/api/link.rb', line 20 def (params = {}) template.(params) end |
#href ⇒ Object
12 13 14 |
# File 'lib/mode/api/link.rb', line 12 def href content['href'] end |
#templated ⇒ Object
16 17 18 |
# File 'lib/mode/api/link.rb', line 16 def templated content['templated'] end |