Class: Zillabyte::Command::Base

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/zillabyte/cli/base.rb

Direct Known Subclasses

Auth, Data, Download, Flows, Help, Nuke, Repl, Version

Constant Summary collapse

META_COLUMNS =
["since", "confidence", "source"]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#app, #ask, #command, #create_git_remote, #display, #error, #extract_app_from_git_config, #extract_app_in_dir, #format_with_bang, #friendly_dir, #get_flow_ui_link, #get_info, #get_rich_info, #git, #handle_downloading_manifest, #has_git?, #longest, #read_multiline, #truncate_message, #version_okay?, #with_tty

Constructor Details

#initialize(args = [], options = {}) ⇒ Base

Returns a new instance of Base.



15
16
17
18
# File 'lib/zillabyte/cli/base.rb', line 15

def initialize(args=[], options={})
  @args = args
  @options = options
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



12
13
14
# File 'lib/zillabyte/cli/base.rb', line 12

def args
  @args
end

#optionsObject (readonly)

Returns the value of attribute options.



13
14
15
# File 'lib/zillabyte/cli/base.rb', line 13

def options
  @options
end

Class Method Details

.namespaceObject



8
9
10
# File 'lib/zillabyte/cli/base.rb', line 8

def self.namespace
  self.to_s.split("::").last.downcase
end

Instance Method Details

#apiObject



20
21
22
23
24
# File 'lib/zillabyte/cli/base.rb', line 20

def api
  require("zillabyte/api")
  require("zillabyte/auth")
  @__api ||= Zillabyte::API.new(:api_key => Zillabyte::Auth.api_key, :session => self)
end