Class: Val::Claim::Instance
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
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.
91 92 93 94 95 96 97 |
# File 'lib/val.rb', line 91 def initialize type, value @type, @value = type, value @ok = type.proc === value rescue @error = $! @ok = false end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
89 90 91 |
# File 'lib/val.rb', line 89 def error @error end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
89 90 91 |
# File 'lib/val.rb', line 89 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
89 90 91 |
# File 'lib/val.rb', line 89 def value @value end |
Instance Method Details
#ok? ⇒ Boolean
99 100 101 |
# File 'lib/val.rb', line 99 def ok? @ok end |