Class: SubZero::CLI::New

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/sub_zero/cli/new.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/sub_zero/cli/new.rb', line 6

def name
  @name
end

Class Method Details

.source_rootObject



8
9
10
# File 'lib/sub_zero/cli/new.rb', line 8

def self.source_root
  File.dirname(__FILE__)
end

Instance Method Details

#client(name = nil) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/sub_zero/cli/new.rb', line 28

def client name=nil
  if name.nil?
    say "You must supply a name!"
    exit 1
  end

  say "Creating #{name} client..."
  create_client name, options
end

#service(name = nil) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/sub_zero/cli/new.rb', line 17

def service name=nil
  if name.nil?
    say "You must supply a name!"
    exit 1
  end

  say "Creating #{name} service..."
  create_service name, options
end