Sha256: 9e916b0498adc9319e17516a2894962d72e80793ab04b60cf39e0cf8e16248ad
Contents?: true
Size: 436 Bytes
Versions: 1
Compression:
Stored size: 436 Bytes
Contents
class Sameas::Results < Sameas::Base attr_accessor :attributes def initialize(attributes = {}) @attributes = attributes.nested_symbolize_keys! end def method_missing(method, args = nil) unless @attributes.has_key?(method.to_sym) raise "No method named #{method.to_s}" end if args.nil? @attributes[method.to_sym] else @attributes[method.to_sym] = args return true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
monkeyhelper-sameasdotorg_fu-0.0.1 | lib/sameas/results.rb |