Class: HMachine::Microformat::RelTag
Constant Summary
collapse
- FRIENDLY_NAME =
"rel-tag"
- WIKI_URL =
"http://microformats.org/wiki/rel-tag"
- XMDP =
'http://microformats.org/profile/rel-tag'
Constants included
from HMachine
PRODID, VERSION
Instance Attribute Summary
Attributes inherited from POSH::Base
#node, #parent, #source
Instance Method Summary
collapse
Methods inherited from POSH::Base
#[], [], add_property, #each_pair, #empty?, extract, get_properties, has_many, has_many!, has_one, has_one!, #has_property?, inherited, #initialize, many, name, one, parent, #properties, properties, property_of?, remove_nested, search, selector, #to_html, validate
Methods included from HMachine
#extract, #extract_from, find, #find_in, #found_in?, get, get_document, get_url, map, normalize, #parse, #parse_first, #search, #valid?, #validate
Instance Method Details
#inspect ⇒ Object
32
33
34
|
# File 'lib/hmachine/microformat/reltag.rb', line 32
def inspect
"<#{self.class}:#{hash}: '#{tag}'>"
end
|
#name ⇒ Object
16
17
18
|
# File 'lib/hmachine/microformat/reltag.rb', line 16
def name
tag.keys.to_s
end
|
#tag ⇒ Object
12
13
14
|
# File 'lib/hmachine/microformat/reltag.rb', line 12
def tag
@tag ||= { node['href'].split('/').last => node['href'] }
end
|
#to_h ⇒ Object
28
29
30
|
# File 'lib/hmachine/microformat/reltag.rb', line 28
def to_h
tag
end
|
#to_s ⇒ Object
20
21
22
|
# File 'lib/hmachine/microformat/reltag.rb', line 20
def to_s
name
end
|
#url ⇒ Object
24
25
26
|
# File 'lib/hmachine/microformat/reltag.rb', line 24
def url
tag.values.to_s
end
|