Sha256: d0059a4ffc504bd202dd4811737fd57431f95725c14e3c987880644c9f66a4c8

Contents?: true

Size: 338 Bytes

Versions: 8

Compression:

Stored size: 338 Bytes

Contents

class ReportObject
    def initialize(hash)
        hash.each do |k,v|
            self.instance_variable_set("@#{k}", v)
            self.class.send(:define_method, k, proc{self.instance_variable_get("@#{k}")})
            self.class.send(:define_method, "#{k}=", proc{|v| self.instance_variable_set("@#{k}", v)})
        end
    end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
juno-report-0.1.6 lib/juno-report/report_object.rb
juno-report-0.1.2 lib/juno-report/report_object.rb
juno-report-0.1.1 lib/juno-report/report_object.rb
juno-report-0.0.9 lib/juno-report/report_object.rb
juno-report-0.0.8 lib/juno-report/report_object.rb
juno-report-0.0.7 lib/juno-report/report_object.rb
juno-report-0.0.6 lib/juno-report/report_object.rb
juno-report-0.0.5 lib/juno-report/report_object.rb