Class: Color

Inherits:
Object show all
Defined in:
lib/predicated/test/test_helper.rb

Overview

DO NOT REQUIRE WRONG IN HERE The circularity between projects will cause certain tests to not work.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Color

Returns a new instance of Color.



13
14
15
# File 'lib/predicated/test/test_helper.rb', line 13

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/predicated/test/test_helper.rb', line 12

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



17
18
19
# File 'lib/predicated/test/test_helper.rb', line 17

def ==(other)
  other.is_a?(Color) && @name == other.name
end

#to_sObject



21
22
23
# File 'lib/predicated/test/test_helper.rb', line 21

def to_s
  "name:#{@name}"
end