Class: Microformat::ItemDocument
- Inherits:
-
Object
- Object
- Microformat::ItemDocument
- Defined in:
- lib/microformat.rb
Instance Attribute Summary collapse
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
Instance Method Summary collapse
-
#initialize(scopes) ⇒ ItemDocument
constructor
A new instance of ItemDocument.
- #products ⇒ Object
Constructor Details
#initialize(scopes) ⇒ ItemDocument
Returns a new instance of ItemDocument.
97 98 99 |
# File 'lib/microformat.rb', line 97 def initialize(scopes) @scopes = scopes end |
Instance Attribute Details
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
95 96 97 |
# File 'lib/microformat.rb', line 95 def scopes @scopes end |
Instance Method Details
#products ⇒ Object
101 102 103 |
# File 'lib/microformat.rb', line 101 def products @scopes.select { |x| x.type =~ /\/product$/i } end |