Module: SimpleAMS::Methy

Defined in:
lib/simple_ams/methy.rb

Class Method Summary collapse

Class Method Details

.of(hash = {}) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/simple_ams/methy.rb', line 2

def self.of(hash = {})
  m = Module.new
  hash.each do |key, value|
    m.send(:define_method, key) { value }
  end

  m
end