module Nomad
Constants
- VERSION
Attributes
client[R]
API
client object based off the configured options in {Configurable}.
@return [Nomad::Client]
Public Class Methods
method_missing(m, *args, &block)
click to toggle source
Delegate all methods to the client object, essentially making the module object behave like a {Client}.
Calls superclass method
# File lib/nomad.rb, line 35 def method_missing(m, *args, &block) if @client.respond_to?(m) @client.send(m, *args, &block) else super end end
respond_to_missing?(m, include_private = false)
click to toggle source
Delegating respond_to
to the {Client}.
Calls superclass method
# File lib/nomad.rb, line 44 def respond_to_missing?(m, include_private = false) @client.respond_to?(m, include_private) || super end
setup!()
click to toggle source
# File lib/nomad.rb, line 19 def setup! @client = Nomad::Client.new # Set secure SSL options OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options].tap do |opts| opts &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2) opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3) end self end