Class: CollectionJSON::Link
- Inherits:
-
Hash
- Object
- Hash
- CollectionJSON::Link
- Defined in:
- lib/collection-json/attributes/link.rb
Class Method Summary collapse
Instance Method Summary collapse
- #href ⇒ Object
- #href=(value) ⇒ Object
- #name ⇒ Object
- #name=(value) ⇒ Object
- #prompt ⇒ Object
- #prompt=(value) ⇒ Object
- #rel ⇒ Object
- #rel=(value) ⇒ Object
- #render ⇒ Object
- #render=(value) ⇒ Object
Class Method Details
.from_hash(hash) ⇒ Object
3 4 5 |
# File 'lib/collection-json/attributes/link.rb', line 3 def self.from_hash(hash) self.new.merge! hash end |
Instance Method Details
#href ⇒ Object
7 |
# File 'lib/collection-json/attributes/link.rb', line 7 def href; self['href']; end |
#href=(value) ⇒ Object
8 |
# File 'lib/collection-json/attributes/link.rb', line 8 def href=(value); self['href'] = value; end |
#name ⇒ Object
13 |
# File 'lib/collection-json/attributes/link.rb', line 13 def name; self['name']; end |
#name=(value) ⇒ Object
14 |
# File 'lib/collection-json/attributes/link.rb', line 14 def name=(value); self['name'] = value; end |
#prompt ⇒ Object
19 |
# File 'lib/collection-json/attributes/link.rb', line 19 def prompt; self['prompt']; end |
#prompt=(value) ⇒ Object
20 |
# File 'lib/collection-json/attributes/link.rb', line 20 def prompt=(value); self['prompt'] = value; end |
#rel ⇒ Object
10 |
# File 'lib/collection-json/attributes/link.rb', line 10 def rel; self['rel']; end |
#rel=(value) ⇒ Object
11 |
# File 'lib/collection-json/attributes/link.rb', line 11 def rel=(value); self['rel'] = value; end |
#render ⇒ Object
16 |
# File 'lib/collection-json/attributes/link.rb', line 16 def render; self['render']; end |
#render=(value) ⇒ Object
17 |
# File 'lib/collection-json/attributes/link.rb', line 17 def render=(value); self['render'] = value; end |