Class: Roby::Queries::LocalQueryResult
- Defined in:
- lib/roby/queries/local_query_result.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#initial_set ⇒ Object
readonly
Returns the value of attribute initial_set.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#result_set ⇒ Object
Returns the value of attribute result_set.
Instance Method Summary collapse
- #each(&block) ⇒ Object
- #include?(obj) ⇒ Boolean
-
#initialize(plan, initial_set, result_set) ⇒ LocalQueryResult
constructor
A new instance of LocalQueryResult.
Constructor Details
#initialize(plan, initial_set, result_set) ⇒ LocalQueryResult
Returns a new instance of LocalQueryResult.
9 10 11 12 13 14 15 |
# File 'lib/roby/queries/local_query_result.rb', line 9 def initialize(plan, initial_set, result_set) @plan = plan @initial_set = initial_set @result_set = Set.new @result_set.compare_by_identity @result_set.merge(result_set) end |
Instance Attribute Details
#initial_set ⇒ Object (readonly)
Returns the value of attribute initial_set.
6 7 8 |
# File 'lib/roby/queries/local_query_result.rb', line 6 def initial_set @initial_set end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
6 7 8 |
# File 'lib/roby/queries/local_query_result.rb', line 6 def plan @plan end |
#result_set ⇒ Object
Returns the value of attribute result_set.
7 8 9 |
# File 'lib/roby/queries/local_query_result.rb', line 7 def result_set @result_set end |
Instance Method Details
#each(&block) ⇒ Object
21 22 23 |
# File 'lib/roby/queries/local_query_result.rb', line 21 def each(&block) result_set.each(&block) end |
#include?(obj) ⇒ Boolean
17 18 19 |
# File 'lib/roby/queries/local_query_result.rb', line 17 def include?(obj) result_set.include?(obj) end |