Class: Halva::Curie
- Inherits:
-
Object
- Object
- Halva::Curie
- Defined in:
- lib/halva/curie.rb
Overview
Compact URI Link Object See [HAL Draft](datatracker.ietf.org/doc/html/draft-kelly-json-hal#section-8.2)
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#relation ⇒ Object
readonly
Returns the value of attribute relation.
Instance Method Summary collapse
-
#initialize(href, name) ⇒ Curie
constructor
A new instance of Curie.
- #to_h ⇒ Object
Constructor Details
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
7 8 9 |
# File 'lib/halva/curie.rb', line 7 def href @href end |
#relation ⇒ Object (readonly)
Returns the value of attribute relation.
7 8 9 |
# File 'lib/halva/curie.rb', line 7 def relation @relation end |
Instance Method Details
#to_h ⇒ Object
17 18 19 |
# File 'lib/halva/curie.rb', line 17 def to_h @link.to_h end |