Class: Microformat::ItemScope
- Inherits:
-
Object
- Object
- Microformat::ItemScope
- Defined in:
- lib/microformat.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(node, strict) ⇒ ItemScope
constructor
A new instance of ItemScope.
Constructor Details
#initialize(node, strict) ⇒ ItemScope
Returns a new instance of ItemScope.
60 61 62 63 64 65 66 67 |
# File 'lib/microformat.rb', line 60 def initialize(node, strict) @type = attr 'itemtype', node @id = attr 'itemid', node @properties = {} @strict = strict parse_elements node.search './*' end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
58 59 60 |
# File 'lib/microformat.rb', line 58 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
58 59 60 |
# File 'lib/microformat.rb', line 58 def type @type end |
Instance Method Details
#[](name) ⇒ Object
69 70 71 |
# File 'lib/microformat.rb', line 69 def [](name) @properties[name] end |