class Test

Attributes

name[R]
status[R]

Public Class Methods

new(status, name) click to toggle source
# File lib/test.rb, line 4
def initialize(status, name)
  @status = status
  @name = name
end

Public Instance Methods

==(another_test) click to toggle source
# File lib/test.rb, line 13
def ==(another_test)
  fields_used_for_comparison.inject(true) do |acc, m|
    acc && instance_variable_get("@#{m}") == another_test.send(m)
  end
end
passed?() click to toggle source
# File lib/test.rb, line 9
def passed?
  @status
end

Private Instance Methods

fields_used_for_comparison() click to toggle source
# File lib/test.rb, line 21
def fields_used_for_comparison
  [:status, :name]
end