Class: Goodcheck::Matcher

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, src:, rule:) ⇒ Matcher

Returns a new instance of Matcher.



7
8
9
10
11
# File 'lib/goodcheck/matcher.rb', line 7

def initialize(path:, src:, rule:)
  @path = path
  @src = src
  @rule = rule
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



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

def path
  @path
end

#ruleObject (readonly)

Returns the value of attribute rule.



5
6
7
# File 'lib/goodcheck/matcher.rb', line 5

def rule
  @rule
end

#srcObject (readonly)

Returns the value of attribute src.



4
5
6
# File 'lib/goodcheck/matcher.rb', line 4

def src
  @src
end

Instance Method Details

#eachObject



13
14
15
16
17
18
19
# File 'lib/goodcheck/matcher.rb', line 13

def each
  if block_given?

  else
    enum_for :each
  end
end