Module: Kanji::InstanceDefine

Included in:
Type::AttributeDefiner, Type::MutationDefiner
Defined in:
lib/kanji/instance_define.rb

Instance Method Summary collapse

Instance Method Details

#instance_define(*args) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/kanji/instance_define.rb', line 3

def instance_define(*args)
  args.each do |arg|
    define_method "#{arg}" do |value|
      instance_variable_set("@_#{arg}", value)
    end
  end
end