Class: FlexValidations::Call::SuccessMessage

Inherits:
Object
  • Object
show all
Includes:
ResultMessage
Defined in:
lib/flex_validations/call.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, method, args, ret) ⇒ SuccessMessage



36
37
38
39
40
41
# File 'lib/flex_validations/call.rb', line 36

def initialize(value, method, args, ret)
  @value = value
  @method = method
  @args = args
  @ret = ret
end

Instance Method Details

#to_sObject



43
44
45
46
47
# File 'lib/flex_validations/call.rb', line 43

def to_s
  args = "(#{@args.map(&:inspect).join(', ')})" if @args.length > 0

  "#{@value.inspect}.#{@method}#{args} returned #{@ret.inspect}"
end