Module: Droppper

Defined in:
lib/droppper.rb,
lib/droppper/cli.rb,
lib/droppper/sizes.rb,
lib/droppper/utils.rb,
lib/droppper/config.rb,
lib/droppper/images.rb,
lib/droppper/actions.rb,
lib/droppper/regions.rb,
lib/droppper/version.rb,
lib/droppper/droplets.rb,
lib/droppper/commands/sizes.rb,
lib/droppper/commands/images.rb,
lib/droppper/commands/actions.rb,
lib/droppper/commands/regions.rb,
lib/droppper/commands/droplets.rb

Defined Under Namespace

Modules: Actions, Commands, Droplets, Images, Regions, Sizes, Utils Classes: CLI, Config

Constant Summary collapse

VERSION =
"0.3.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientObject

Returns the value of attribute client.



22
23
24
# File 'lib/droppper.rb', line 22

def client
  @client
end

.configObject

Returns the value of attribute config.



22
23
24
# File 'lib/droppper.rb', line 22

def config
  @config
end

Class Method Details

.setup(options) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/droppper.rb', line 24

def setup(options)
  self.config = Droppper::Config.new
  self.config.token = options["token"] if options["token"]
  self.client = DropletKit::Client.new(access_token: config.token)
  # def client.connection
  #   @connection ||= Faraday.new(connection_options) do |req|
  #     req.adapter :net_http
  #     req.response :logger
  #   end
  # end
end