Class: PatternMatcher::Match
- Inherits:
-
Object
- Object
- PatternMatcher::Match
- Defined in:
- lib/pattern_matcher/match.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#regex_match ⇒ Object
Returns the value of attribute regex_match.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Match
constructor
A new instance of Match.
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
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/pattern_matcher/match.rb', line 4 def name @name end |
#regex_match ⇒ Object
Returns the value of attribute regex_match.
4 5 6 |
# File 'lib/pattern_matcher/match.rb', line 4 def regex_match @regex_match end |