Class: AgentRuby::Result
- Inherits:
-
Object
- Object
- AgentRuby::Result
- Defined in:
- lib/agent_ruby/result.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, result:) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(action:, result:) ⇒ Result
Returns a new instance of Result.
7 8 9 10 |
# File 'lib/agent_ruby/result.rb', line 7 def initialize(action:, result:) @action = action @result = result end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
5 6 7 |
# File 'lib/agent_ruby/result.rb', line 5 def action @action end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
5 6 7 |
# File 'lib/agent_ruby/result.rb', line 5 def result @result end |
Class Method Details
.find(all, id) ⇒ Object
12 13 14 |
# File 'lib/agent_ruby/result.rb', line 12 def self.find(all, id) all.find { |r| r.action.id == id.to_i } end |