Class: Val::Message::Instance
Instance Attribute Summary collapse
-
#arrows ⇒ Object
readonly
Returns the value of attribute arrows.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #available? ⇒ Boolean
-
#initialize(type, value) ⇒ Instance
constructor
A new instance of Instance.
- #ok? ⇒ Boolean
Constructor Details
#initialize(type, value) ⇒ Instance
Returns a new instance of Instance.
261 262 263 264 265 266 |
# File 'lib/val.rb', line 261 def initialize type, value @name = type.name @available = value.respond_to? @name @arrows = type.arrows.map &[value] @ok = @available && @arrows.all?(&:ok?) end |
Instance Attribute Details
#arrows ⇒ Object (readonly)
Returns the value of attribute arrows.
268 269 270 |
# File 'lib/val.rb', line 268 def arrows @arrows end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
268 269 270 |
# File 'lib/val.rb', line 268 def name @name end |
Instance Method Details
#available? ⇒ Boolean
270 271 272 |
# File 'lib/val.rb', line 270 def available? @available end |
#ok? ⇒ Boolean
274 275 276 |
# File 'lib/val.rb', line 274 def ok? @ok end |