Class: SqsGrep::Config
- Inherits:
-
Object
- Object
- SqsGrep::Config
- Defined in:
- lib/sqs-grep/config.rb
Instance Attribute Summary collapse
-
#client_options ⇒ Object
Stronger builder pattern would be nice.
-
#delete_matched ⇒ Object
Stronger builder pattern would be nice.
-
#invert_match ⇒ Object
Stronger builder pattern would be nice.
-
#invoke_lambda ⇒ Object
Stronger builder pattern would be nice.
-
#json_format ⇒ Object
Stronger builder pattern would be nice.
-
#lambda_client ⇒ Object
Stronger builder pattern would be nice.
-
#max_count ⇒ Object
Stronger builder pattern would be nice.
-
#pattern ⇒ Object
Stronger builder pattern would be nice.
-
#queue_name ⇒ Object
Stronger builder pattern would be nice.
-
#send_to ⇒ Object
Stronger builder pattern would be nice.
-
#sqs_client ⇒ Object
Stronger builder pattern would be nice.
-
#visibility_timeout ⇒ Object
Stronger builder pattern would be nice.
-
#wait_time_seconds ⇒ Object
Stronger builder pattern would be nice.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #validate ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/sqs-grep/config.rb', line 17 def initialize @client_options = {} @send_to = nil @invoke_lambda = nil @lambda_client = nil @visibility_timeout = 30 @wait_time_seconds = 10 @max_count = nil @delete_matched = false @invert_match = false @json_format = false end |
Instance Attribute Details
#client_options ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def @client_options end |
#delete_matched ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def delete_matched @delete_matched end |
#invert_match ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def invert_match @invert_match end |
#invoke_lambda ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def invoke_lambda @invoke_lambda end |
#json_format ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def json_format @json_format end |
#lambda_client ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def lambda_client @lambda_client end |
#max_count ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def max_count @max_count end |
#pattern ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def pattern @pattern end |
#queue_name ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def queue_name @queue_name end |
#send_to ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def send_to @send_to end |
#sqs_client ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def sqs_client @sqs_client end |
#visibility_timeout ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def visibility_timeout @visibility_timeout end |
#wait_time_seconds ⇒ Object
Stronger builder pattern would be nice
5 6 7 |
# File 'lib/sqs-grep/config.rb', line 5 def wait_time_seconds @wait_time_seconds end |
Instance Method Details
#validate ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/sqs-grep/config.rb', line 30 def validate if !@pattern raise "Missing pattern" end if !@queue_name raise "Missing queue name" end end |