Class: HTMLSchema::Microdata::Object
- Defined in:
- lib/html-schema/microdata/object.rb
Instance Attribute Summary
Attributes inherited from Object
#_name, #as, #attributes, #classes, #parent, #source, #types
Instance Method Summary collapse
Methods inherited from Object
#[], #attribute, #initialize, #inspect, #to_object, #type
Constructor Details
This class inherits a constructor from HTMLSchema::Object
Instance Method Details
#schema_url ⇒ Object
4 5 6 |
# File 'lib/html-schema/microdata/object.rb', line 4 def schema_url @schema_url ||= "http://schema.org/#{as.to_s.camelize}" end |
#to_hash ⇒ Object
8 9 10 |
# File 'lib/html-schema/microdata/object.rb', line 8 def to_hash {:itemscope => "itemscope", :itemtype => schema_url} end |