Class: Val::Message::Arrow::Instance
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Instance Method Summary collapse
-
#initialize(type, value) ⇒ Instance
constructor
A new instance of Instance.
- #ok? ⇒ Boolean
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
#error ⇒ Object (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
254 255 256 |
# File 'lib/val.rb', line 254 def ok? @ok end |