Class: Cadbury::Env

Inherits:
Thor
  • Object
show all
Defined in:
lib/cadbury/environment.rb

Instance Method Summary collapse

Instance Method Details

#delete(name) ⇒ Object



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

def delete(name)
  EnvironmentBuilder.new.delete_environment name
end

#get(name = nil) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/cadbury/environment.rb', line 13

def get(name = nil)
  if name.nil?
    puts JSON.pretty_generate EnvironmentBuilder.new.list_environments
  else
    puts JSON.pretty_generate EnvironmentBuilder.new.get_environment(name: name)
  end
end

#set(name) ⇒ Object



8
9
10
# File 'lib/cadbury/environment.rb', line 8

def set(name)
  EnvironmentBuilder.new.create_environment name
end