Module: Fixture

Defined in:
lib/lax/source.rb

Defined Under Namespace

Modules: Hashable

Class Method Summary collapse

Class Method Details

.new(hash) ⇒ Object



45
46
47
48
49
# File 'lib/lax/source.rb', line 45

def self.new(hash)
  klass = Struct.new(*hash.keys)
  klass.send :include, self
  klass.new *hash.values
end