module Orientdb4r::HashExtension

Extends a Hash produced by JSON.parse.

Public Instance Methods

get_mandatory_attribute(name) click to toggle source

Gets an attribute value that has to be presented.

# File lib/orientdb4r/rest/model.rb, line 10
def get_mandatory_attribute(name)
  key = name.to_s
  raise ::ArgumentError, "unknown attribute, name=#{key}" unless self.include? key
  self[key]
end