Class: PatternMatcher::Match

Inherits:
Object
  • Object
show all
Defined in:
lib/pattern_matcher/match.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Match

Returns a new instance of Match.



6
7
8
9
10
# File 'lib/pattern_matcher/match.rb', line 6

def initialize(hash)
  if hash.is_a?(Hash)
extract_attributes_from_hash hash
  end
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/pattern_matcher/match.rb', line 4

def name
  @name
end

#regex_matchObject

Returns the value of attribute regex_match.



4
5
6
# File 'lib/pattern_matcher/match.rb', line 4

def regex_match
  @regex_match
end