Class: Microby::HEntry
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#bookmark ⇒ Object
Returns the value of attribute bookmark.
-
#categories ⇒ Object
Returns the value of attribute categories.
-
#content ⇒ Object
Returns the value of attribute content.
-
#name ⇒ Object
Returns the value of attribute name.
-
#published_at ⇒ Object
Returns the value of attribute published_at.
-
#summary ⇒ Object
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(microformat) ⇒ HEntry
constructor
Certainly there is a better way to do this.
- #parse_elements(microformat) ⇒ Object
Methods inherited from Element
Constructor Details
#initialize(microformat) ⇒ HEntry
Certainly there is a better way to do this.
7 8 9 10 |
# File 'lib/microby/h_entry.rb', line 7 def initialize(microformat) @categories = {} super end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
4 5 6 |
# File 'lib/microby/h_entry.rb', line 4 def @author end |
#bookmark ⇒ Object
Returns the value of attribute bookmark.
4 5 6 |
# File 'lib/microby/h_entry.rb', line 4 def bookmark @bookmark end |
#categories ⇒ Object
Returns the value of attribute categories.
4 5 6 |
# File 'lib/microby/h_entry.rb', line 4 def categories @categories end |
#content ⇒ Object
Returns the value of attribute content.
4 5 6 |
# File 'lib/microby/h_entry.rb', line 4 def content @content end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/microby/h_entry.rb', line 4 def name @name end |
#published_at ⇒ Object
Returns the value of attribute published_at.
4 5 6 |
# File 'lib/microby/h_entry.rb', line 4 def published_at @published_at end |
#summary ⇒ Object
Returns the value of attribute summary.
4 5 6 |
# File 'lib/microby/h_entry.rb', line 4 def summary @summary end |
Instance Method Details
#parse_elements(microformat) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/microby/h_entry.rb', line 12 def parse_elements(microformat) FormatClass.each do |letter| microformat.css(">*[class*=#{letter}-]").each do |attrs| attrs["class"].split.each do |klass| parse_element(attrs, klass) end end end end |