Class: Lamma::CLI::Show

Inherits:
Object
  • Object
show all
Defined in:
lib/lamma/cli/show.rb

Instance Method Summary collapse

Constructor Details

#initialize(options, function_name, thor) ⇒ Show

Returns a new instance of Show.



3
4
5
6
7
8
# File 'lib/lamma/cli/show.rb', line 3

def initialize(options, function_name, thor)
  @options = options
  @thor = thor
  @function_name = function_name
  @conf_path = options[:conf_path] || Lamma::DEFAULT_CONF_PATH
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
# File 'lib/lamma/cli/show.rb', line 10

def run
  f = Lamma::Function.new(@function_name)

  unless f.remote_exist?
    thor.say("Function #{f.name} doesn't exist in remote.")
  end

  thor.say(f) # XXX:
end