Class: HTMLSchema::Microdata::Object

Inherits:
Object
  • Object
show all
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_urlObject



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_hashObject



8
9
10
# File 'lib/html-schema/microdata/object.rb', line 8

def to_hash
  {:itemscope => "itemscope", :itemtype => schema_url}
end