lib/skemata/node.rb
#
# Draw a new schema.org node and merge it into the current serializable
# hash.
#
# @param token [String] Name of DSL / Hash entry
# @param type [String] schema.org type
# @param property [Object] Anything, but if symbol,
#   will extract from #root_object
# @param &block [Block] DSL definition
#
# @return [Hash] Hash#merge! return value with new node
Draw a new schema.org node and merge it into the current serializable
hash.
Draw a new schema . org node and merge it into the current serializable hash .
def internal_draw(token, type, property, &block)
      property = root_object.send(property) if property.is_a?(Symbol)
      data.merge!(
        token.to_s => DSL.draw(
          { type: type, root_object: property, is_root: false },
          &block
        )
      ) if property.present?
    end
def internal_draw ( token , type , property , & block ) property = root_object . send ( property ) if property . is_a? ( Symbol ) data . merge! ( token . to_s => DSL . draw ( { type : type , root_object : property , is_root : false } , & block ) ) if property . present? end
Draw a new schema.org node and merge it into the current serializable
hash.
Draw a new schema . org node and merge it into the current serializable hash .
Hash#merge. return value with new node
Hash#merge . return value with new node
Hash
token
Name of DSL / Hash entry
Name of DSL / Hash entry
type
None
property
Anything, but if symbol, will extract from #root_object
Anything but if symbol will extract from #root_object
block
&block
None