Class: Hushed::Client
- Inherits:
-
Object
- Object
- Hushed::Client
- Defined in:
- lib/hushed/client.rb
Defined Under Namespace
Classes: InitializationError, InvalidBucketError, InvalidQueueError
Instance Attribute Summary collapse
-
#business_unit ⇒ Object
readonly
Returns the value of attribute business_unit.
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#warehouse ⇒ Object
readonly
Returns the value of attribute warehouse.
Instance Method Summary collapse
- #from_quiet_bucket ⇒ Object
- #from_quiet_queue ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #quiet_inventory_queue ⇒ Object
- #to_quiet_bucket ⇒ Object
- #to_quiet_queue ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/hushed/client.rb', line 15 def initialize( = {}) = .with_indifferent_access @buckets = [:buckets] @queues = [:queues] @client_id = [:client_id] @warehouse = [:warehouse] @business_unit = [:business_unit] @credentials = .slice(:access_key_id, :secret_access_key) verify! end |
Instance Attribute Details
#business_unit ⇒ Object (readonly)
Returns the value of attribute business_unit.
13 14 15 |
# File 'lib/hushed/client.rb', line 13 def business_unit @business_unit end |
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
13 14 15 |
# File 'lib/hushed/client.rb', line 13 def client_id @client_id end |
#warehouse ⇒ Object (readonly)
Returns the value of attribute warehouse.
13 14 15 |
# File 'lib/hushed/client.rb', line 13 def warehouse @warehouse end |
Instance Method Details
#from_quiet_bucket ⇒ Object
30 31 32 |
# File 'lib/hushed/client.rb', line 30 def from_quiet_bucket @from_quiet_bucket ||= fetch_bucket(@buckets[:from]) end |
#from_quiet_queue ⇒ Object
38 39 40 |
# File 'lib/hushed/client.rb', line 38 def from_quiet_queue @from_quiet_queue ||= fetch_queue(@queues[:from]) end |
#quiet_inventory_queue ⇒ Object
42 43 44 |
# File 'lib/hushed/client.rb', line 42 def quiet_inventory_queue @quiet_inventory_queue ||= fetch_queue(@queues[:inventory]) end |
#to_quiet_bucket ⇒ Object
26 27 28 |
# File 'lib/hushed/client.rb', line 26 def to_quiet_bucket @to_quiet_bucket ||= fetch_bucket(@buckets[:to]) end |
#to_quiet_queue ⇒ Object
34 35 36 |
# File 'lib/hushed/client.rb', line 34 def to_quiet_queue @to_quiet_queue ||= fetch_queue(@queues[:to]) end |