Class: Odin::Types::PatternConstraint
- Inherits:
-
Object
- Object
- Odin::Types::PatternConstraint
- Defined in:
- lib/odin/types/schema.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(pattern:, message: nil) ⇒ PatternConstraint
constructor
A new instance of PatternConstraint.
Constructor Details
#initialize(pattern:, message: nil) ⇒ PatternConstraint
Returns a new instance of PatternConstraint.
70 71 72 73 74 75 |
# File 'lib/odin/types/schema.rb', line 70 def initialize(pattern:, message: nil) @kind = :pattern @pattern = pattern.freeze @message = &.freeze freeze end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
68 69 70 |
# File 'lib/odin/types/schema.rb', line 68 def kind @kind end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
68 69 70 |
# File 'lib/odin/types/schema.rb', line 68 def @message end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
68 69 70 |
# File 'lib/odin/types/schema.rb', line 68 def pattern @pattern end |