Class: Ni::Result
- Inherits:
-
Object
- Object
- Ni::Result
- Defined in:
- lib/ni/result.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize(context, args = []) ⇒ Result
constructor
A new instance of Result.
- #to_ary ⇒ Object
Constructor Details
#initialize(context, args = []) ⇒ Result
Returns a new instance of Result.
7 8 9 |
# File 'lib/ni/result.rb', line 7 def initialize(context, args=[]) @context, @args = context, args end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
3 4 5 |
# File 'lib/ni/result.rb', line 3 def context @context end |
Instance Method Details
#to_ary ⇒ Object
11 12 13 |
# File 'lib/ni/result.rb', line 11 def to_ary [self] + @args end |