Exception: Atomy::PatternMismatch
- Defined in:
- lib/atomy/errors.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(pattern, value) ⇒ PatternMismatch
constructor
A new instance of PatternMismatch.
- #to_s ⇒ Object
Constructor Details
#initialize(pattern, value) ⇒ PatternMismatch
Returns a new instance of PatternMismatch.
31 32 33 34 |
# File 'lib/atomy/errors.rb', line 31 def initialize(pattern, value) @pattern = pattern @value = value end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
29 30 31 |
# File 'lib/atomy/errors.rb', line 29 def pattern @pattern end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
29 30 31 |
# File 'lib/atomy/errors.rb', line 29 def value @value end |
Instance Method Details
#to_s ⇒ Object
36 37 38 |
# File 'lib/atomy/errors.rb', line 36 def to_s "pattern `#{pattern}' did not match value `#{value.inspect}'" end |