Class: Validate::Constraints::ValidationContext::KeyPath

Inherits:
Object
  • Object
show all
Defined in:
lib/validate/constraints/validation_context.rb

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ KeyPath

Returns a new instance of KeyPath.



135
136
137
# File 'lib/validate/constraints/validation_context.rb', line 135

def initialize(key)
  @key = key
end

Instance Method Details

#inspectObject



143
144
145
# File 'lib/validate/constraints/validation_context.rb', line 143

def inspect
  "#<#{self.class.name} #{@key.inspect}>"
end

#to_sObject



139
140
141
# File 'lib/validate/constraints/validation_context.rb', line 139

def to_s
  "[#{@key.inspect}]"
end