Class: Hermod::Validators::RegularExpression
- Defined in:
- lib/hermod/validators/regular_expression.rb
Overview
Checks the value matches the given regular expression
Instance Attribute Summary collapse
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(pattern) ⇒ RegularExpression
constructor
Sets up the pattern the value is expected to match.
Methods inherited from Base
Constructor Details
#initialize(pattern) ⇒ RegularExpression
Sets up the pattern the value is expected to match
10 11 12 |
# File 'lib/hermod/validators/regular_expression.rb', line 10 def initialize(pattern) @pattern = pattern end |
Instance Attribute Details
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
7 8 9 |
# File 'lib/hermod/validators/regular_expression.rb', line 7 def pattern @pattern end |