Class: Hypermicrodata::Property
- Inherits:
-
Object
- Object
- Hypermicrodata::Property
- Defined in:
- lib/hypermicrodata/property.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#names ⇒ Object
readonly
Returns the value of attribute names.
-
#rels ⇒ Object
readonly
Returns the value of attribute rels.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, names, rels = []) ⇒ Property
constructor
A new instance of Property.
- #item ⇒ Object
- #item? ⇒ Boolean
- #link? ⇒ Boolean
- #submit_button? ⇒ Boolean
Constructor Details
#initialize(value, names, rels = []) ⇒ Property
Returns a new instance of Property.
5 6 7 8 9 |
# File 'lib/hypermicrodata/property.rb', line 5 def initialize(value, names, rels = []) @value = value @names = names @rels = rels end |
Instance Attribute Details
#names ⇒ Object (readonly)
Returns the value of attribute names.
3 4 5 |
# File 'lib/hypermicrodata/property.rb', line 3 def names @names end |
#rels ⇒ Object (readonly)
Returns the value of attribute rels.
3 4 5 |
# File 'lib/hypermicrodata/property.rb', line 3 def rels @rels end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/hypermicrodata/property.rb', line 3 def value @value end |
Instance Method Details
#item ⇒ Object
11 12 13 |
# File 'lib/hypermicrodata/property.rb', line 11 def item @value if @value.is_a?(Item) end |
#item? ⇒ Boolean
15 16 17 |
# File 'lib/hypermicrodata/property.rb', line 15 def item? !!item end |
#link? ⇒ Boolean
19 20 21 |
# File 'lib/hypermicrodata/property.rb', line 19 def link? false end |
#submit_button? ⇒ Boolean
23 24 25 |
# File 'lib/hypermicrodata/property.rb', line 23 def false end |