app/models/run.rb
# input params hash to entity_ref
#  dummy arg is to keep compatibility with Run#to_entity_ref
input params hash to entity_ref
dummy arg is to keep compatibility with Run#to_entity_ref
input params hash to entity_ref dummy arg is to keep compatibility with Run#to_entity_ref
def to_entity_ref(dummy = nil)
    entity_id = keys.first
    id, model = entity_id.to_id_and_model if entity_id
    content = values.first || {}
    content.is_a?(Hash) or fail ArgumentError, "content part of #{self.inspect} should be a Hash."
    new_content = {}
    content.each_pair do |attr_name, attr_value|
      new_content.merge! attr_name => Hash.attr_value_to_entity_ref(attr_value)
    end
    EntityRef.new entity_id => new_content
  rescue ArgumentError => e
    fail ArgumentError, e
  end
def to_entity_ref ( dummy = nil ) entity_id = keys . first id , model = entity_id . to_id_and_model if entity_id content = values . first || { } content . is_a? ( Hash ) or fail ArgumentError , "content part of #{self.inspect} should be a Hash." new_content = { } content . each_pair do | attr_name , attr_value | new_content . merge! attr_name => Hash . attr_value_to_entity_ref ( attr_value ) end EntityRef . new entity_id => new_content rescue ArgumentError => e fail ArgumentError , e end
input params hash to entity_ref
dummy arg is to keep compatibility with Run#to_entity_ref
input params hash to entity_ref dummy arg is to keep compatibility with Run#to_entity_ref
# verify entity_id
dummy
<not_specific>