Class: Medie::Link
- Inherits:
-
Object
show all
- Defined in:
- lib/medie/link.rb
Overview
Instance Method Summary
collapse
Constructor Details
#initialize(obj) ⇒ Link
Returns a new instance of Link.
5
6
7
|
# File 'lib/medie/link.rb', line 5
def initialize(obj)
@obj = obj
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args, &block) ⇒ Object
24
25
26
|
# File 'lib/medie/link.rb', line 24
def method_missing(symbol, *args, &block)
@obj.send(symbol, *args, &block)
end
|
Instance Method Details
#content_type ⇒ Object
20
21
22
|
# File 'lib/medie/link.rb', line 20
def content_type
@obj["type"]
end
|
#href ⇒ Object
13
14
15
|
# File 'lib/medie/link.rb', line 13
def href
@obj["href"]
end
|
#rel ⇒ Object
17
18
19
|
# File 'lib/medie/link.rb', line 17
def rel
@obj["rel"]
end
|
#to_s ⇒ Object
28
29
30
|
# File 'lib/medie/link.rb', line 28
def to_s
"<link to #{@options}>"
end
|
#type ⇒ Object
9
10
11
|
# File 'lib/medie/link.rb', line 9
def type
content_type
end
|