Class: Microformats2::ImpliedProperty::Foundation
- Inherits:
-
Object
- Object
- Microformats2::ImpliedProperty::Foundation
- Defined in:
- lib/microformats2/implied_property/foundation.rb
Instance Method Summary collapse
-
#initialize(element, base = nil) ⇒ Foundation
constructor
A new instance of Foundation.
- #method_name ⇒ Object
- #parse ⇒ Object
- #to_hash ⇒ Object
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(element, base = nil) ⇒ Foundation
Returns a new instance of Foundation.
5 6 7 8 |
# File 'lib/microformats2/implied_property/foundation.rb', line 5 def initialize(element, base=nil) @element = element @base = base end |
Instance Method Details
#method_name ⇒ Object
14 15 16 |
# File 'lib/microformats2/implied_property/foundation.rb', line 14 def method_name "foundation" end |
#parse ⇒ Object
10 11 12 |
# File 'lib/microformats2/implied_property/foundation.rb', line 10 def parse self if to_s end |
#to_hash ⇒ Object
22 23 24 |
# File 'lib/microformats2/implied_property/foundation.rb', line 22 def to_hash to_s end |
#to_json ⇒ Object
26 27 28 |
# File 'lib/microformats2/implied_property/foundation.rb', line 26 def to_json to_hash.to_json end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/microformats2/implied_property/foundation.rb', line 18 def to_s @to_s ||= element_value || selector_value end |