Sha256: 33d5a0abbe6fe72dbf1baa74053aa6252d9113ccff47a61cf2c16724de2aab6f
Contents?: true
Size: 386 Bytes
Versions: 5
Compression:
Stored size: 386 Bytes
Contents
module ArrayLogic # Basic object used in testing class Thing attr_accessor :id def initialize(number) @id = number end def cost 2 end def id_odd? return true if id % 2 != 0 end def self.make(number) things = Hash.new (1..number).each{|n| things[n] = new(n)} return things end end end
Version data entries
5 entries across 5 versions & 1 rubygems