class Screening::Statistics
Public Class Methods
attr_hash(method_hash)
click to toggle source
# File lib/screening.rb, line 106 def attr_hash(method_hash) define_method(method_hash) do self[method_hash] end define_method("#{method_hash}=") do |value| self[method_hash] = value end end
Public Instance Methods
method_missing(method_id, *args, &block)
click to toggle source
# File lib/screening.rb, line 115 def method_missing(method_id, *args, &block) method_id_chopped = method_id =~ /\=/ ? method_id.to_s.chop.to_sym : method_id self.class.attr_hash method_id_chopped if method_id =~ /\=/ __send__("#{method_id_chopped}=", args[0]) else __send__(method_id_chopped) end end