Method: Mida::Item#initialize
- Defined in:
- lib/mida/item.rb
#initialize(itemscope) ⇒ Item
Create a new Item object from an Itemscope and validates its properties
- itemscope
-
The itemscope that has been parsed by
Itemscope
27 28 29 30 31 32 33 |
# File 'lib/mida/item.rb', line 27 def initialize(itemscope) @type = itemscope.type @id = itemscope.id @vocabulary = Mida::Vocabulary.find(@type) @properties = itemscope.properties validate_properties end |