Class: KitHash

Inherits:
Hash
  • Object
show all
Includes:
Kit
Defined in:
lib/graphkit.rb

Overview

See Kit

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Kit

#check, #method_missing

Methods inherited from Hash

#modify

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Kit

Class Method Details

.from_hash(hash) ⇒ Object



236
237
238
239
240
241
242
# File 'lib/graphkit.rb', line 236

def self.from_hash(hash)
	kit = new
	hash.each do |key, val|
		kit[key] = val
	end
	kit
end

Instance Method Details

#inspectObject



233
234
235
# File 'lib/graphkit.rb', line 233

def inspect
	return (%[#{self.class}.from_hash(#{old_inspect})])
end