Class: Aggro::AggregateRef
- Inherits:
-
Struct
- Object
- Struct
- Aggro::AggregateRef
- Defined in:
- lib/aggro/aggregate_ref.rb
Overview
Public: Reference to an Aggregate which may be local or remote.
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
3 4 5 |
# File 'lib/aggro/aggregate_ref.rb', line 3 def id @id end |
#type ⇒ Object
Returns the value of attribute type
3 4 5 |
# File 'lib/aggro/aggregate_ref.rb', line 3 def type @type end |
Instance Method Details
#command(command) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/aggro/aggregate_ref.rb', line 4 def command(command) response = send_command(command) if response.is_a? Message::InvalidTarget create response = send_command(command) end fail 'Could not send command' unless response.is_a? Message::OK self end |
#create ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/aggro/aggregate_ref.rb', line 17 def create response = client.post fail 'Could not create aggregate' unless response.is_a? Message::OK self end |
#query(query) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/aggro/aggregate_ref.rb', line 25 def query(query) response = send_query(query) if response.is_a? Message::InvalidTarget create response = send_query(query) end handle_query_response response end |