module GoodData::Mixin::PropertyAccessor
Public Instance Methods
Source
# File lib/gooddata/mixins/property_accessor.rb, line 24 def property_accessor(*args) property_reader(*args) property_writer(*args) end
Source
# File lib/gooddata/mixins/property_accessor.rb, line 8 def property_reader(where, *props) props.each do |prop| define_method(prop, proc { instance_variable_get(where)[prop] }) end end
Source
# File lib/gooddata/mixins/property_accessor.rb, line 16 def property_writer(where, *props) props.each do |prop| define_method("#{prop}=", proc { |val| instance_variable_get(where)[prop] = val }) end end