Module: Squake
- Extended by:
- T::Sig
- Defined in:
- lib/squake/util.rb,
lib/squake.rb,
lib/squake/client.rb,
lib/squake/config.rb,
lib/squake/return.rb,
lib/squake/pricing.rb,
lib/squake/version.rb,
lib/squake/products.rb,
lib/squake/purchase.rb,
lib/squake/response.rb,
lib/squake/api_error.rb,
lib/squake/calculation.rb,
lib/squake/model/price.rb,
lib/squake/model/carbon.rb,
lib/squake/model/pricing.rb,
lib/squake/model/product.rb,
lib/squake/model/purchase.rb,
lib/squake/model/carbon_unit.rb,
lib/squake/model/items/base_type.rb,
lib/squake/errors/api_error_result.rb,
lib/squake/errors/api_error_source.rb,
lib/squake/calculation_with_pricing.rb,
lib/squake/model/items/private_jet/squake.rb
Overview
typed: strict
Defined Under Namespace
Modules: Errors, Model Classes: APIError, Calculation, CalculationWithPricing, Client, Config, Pricing, Products, Purchase, Response, Return, Util
Constant Summary collapse
- OJ_CONFIG =
Don’t freeze this constant, since we don’t know what Oj is doing with the object under the hood Don’t set this as global Oj settings to avoid bleeding into other apps that build on this gem rubocop:disable Style/MutableConstant
T.let( { mode: :compat, # required to dump hashes with symbol-keys symbol_keys: true, }, T::Hash[Symbol, T.untyped], )
- VERSION =
'0.6.2'
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
Class Method Summary collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
28 29 30 |
# File 'lib/squake.rb', line 28 def configuration @configuration end |
Class Method Details
.configure {|T.must(configuration)| ... } ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/squake.rb', line 35 def configure(&_) self.configuration ||= Squake::Config.new( api_key: ENV.fetch('SQUAKE_API_KEY', nil), keep_alive_timeout: ENV.fetch('SQUAKE_KEEP_ALIVE_TIMEOUT', 30).to_i, sandbox_mode: ENV.fetch('SQUAKE_SANDBOX_MODE', 'true').casecmp?('true'), enforced_api_base: ENV.fetch('SQUAKE_API_BASE', nil), ) yield(T.must(configuration)) end |