Class: CollectionJSON::Link

Inherits:
Hash
  • Object
show all
Defined in:
lib/collection-json/attributes/link.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#hrefObject



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

#nameObject



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

#promptObject



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

#relObject



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

#renderObject



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