Class: Casecollect::Client
- Inherits:
-
Object
- Object
- Casecollect::Client
- Defined in:
- lib/casecollect/client.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #cases ⇒ Object
- #communications ⇒ Object
-
#initialize(cli_options = {}, aws_configuration = {}) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(cli_options = {}, aws_configuration = {}) ⇒ Client
Returns a new instance of Client.
7 8 9 10 11 12 13 14 |
# File 'lib/casecollect/client.rb', line 7 def initialize( = {}, aws_configuration = {}) = @logger ||= Logger.new STDOUT aws_configuration[:logger] = Logger.new STDOUT if .verbose @aws_configuration = aws_configuration @support = Aws::Support::Client.new aws_configuration end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
5 6 7 |
# File 'lib/casecollect/client.rb', line 5 def logger @logger end |
Instance Method Details
#cases ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/casecollect/client.rb', line 16 def cases return enum_for(__method__) unless block_given? nt = nil begin resp = @support.describe_cases(case_option(nt)) nt = resp.next_token resp.cases.each {|c| yield c} end while nt end |
#communications ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/casecollect/client.rb', line 27 def communications return enum_for(__method__) unless block_given? nt = nil begin cases do |c| describe_communications(c) do |cc| yield c.display_id, cc end end end while nt end |