Class: Validate::Constraints::ValidationContext::AttrPath

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

Instance Method Summary collapse

Constructor Details

#initialize(attr) ⇒ AttrPath

Returns a new instance of AttrPath.



149
150
151
# File 'lib/validate/constraints/validation_context.rb', line 149

def initialize(attr)
  @attr = attr
end

Instance Method Details

#inspectObject



157
158
159
# File 'lib/validate/constraints/validation_context.rb', line 157

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

#to_sObject



153
154
155
# File 'lib/validate/constraints/validation_context.rb', line 153

def to_s
  ".#{@attr}"
end