module Stitcher::Accessor
Public Instance Methods
stitcher_accessor(**opt)
click to toggle source
# File lib/stitcher/accessor.rb, line 17 def stitcher_accessor **opt attr_reader *opt.keys Accessor.instance_method(:stitcher_writer).bind(self).(opt) end
stitcher_writer(**opt)
click to toggle source
# File lib/stitcher/accessor.rb, line 9 def stitcher_writer **opt opt.each { |name, type| Register.register(self, "#{name}=", [type], (DefineMethod.as_instance_executable do |var| instance_variable_set "@#{name}", var end)) } end