Class: Val::Message::Arrow::Instance

Inherits:
Object
  • Object
show all
Defined in:
lib/val.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, value) ⇒ Instance

Returns a new instance of Instance.



245
246
247
248
249
250
# File 'lib/val.rb', line 245

def initialize type, value
  @actual_output = value.send type.name, *type.input
  @ok = @actual_output == type.expected_output
rescue
  @error = $!
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



252
253
254
# File 'lib/val.rb', line 252

def error
  @error
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


254
255
256
# File 'lib/val.rb', line 254

def ok?
  @ok
end