Class: Cql::Client::ExecuteOptionsDecoder
- Inherits:
-
Object
- Object
- Cql::Client::ExecuteOptionsDecoder
- Defined in:
- lib/cql/client/execute_options_decoder.rb
Instance Method Summary collapse
- #decode_options(options_or_consistency) ⇒ Object
-
#initialize(default_consistency) ⇒ ExecuteOptionsDecoder
constructor
A new instance of ExecuteOptionsDecoder.
Constructor Details
#initialize(default_consistency) ⇒ ExecuteOptionsDecoder
Returns a new instance of ExecuteOptionsDecoder.
6 7 8 |
# File 'lib/cql/client/execute_options_decoder.rb', line 6 def initialize(default_consistency) @default_consistency = default_consistency end |
Instance Method Details
#decode_options(options_or_consistency) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/cql/client/execute_options_decoder.rb', line 10 def () consistency = @default_consistency timeout = nil case when Symbol consistency = when Hash consistency = [:consistency] || consistency timeout = [:timeout] end return consistency, timeout end |