Class: ActLike::Matcher

Inherits:
Object
  • Object
show all
Defined in:
lib/act_like/matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actual, expected) ⇒ Matcher

Returns a new instance of Matcher.



5
6
7
8
9
# File 'lib/act_like/matcher.rb', line 5

def initialize(actual, expected)
  @actual = actual
  @expected = expected
  @offenses = Hash.new { |offenses, offense| offenses[offense] = Array.new }
end

Instance Attribute Details

#offensesObject (readonly)

Returns the value of attribute offenses.



3
4
5
# File 'lib/act_like/matcher.rb', line 3

def offenses
  @offenses
end

Instance Method Details

#checkObject



11
12
13
14
# File 'lib/act_like/matcher.rb', line 11

def check
  check_class_methods
  check_instance_methods
end