Class: Kreegerator::CLI

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

Instance Method Summary collapse

Instance Method Details

#ios(method_name, filename = nil) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/kreegerator/cli.rb', line 12

def ios(method_name, filename=nil)
  if Kreegerator::IOS.respond_to?(method_name.to_sym)
    if method_name == 'list'
      Kreegerator::IOS.send(method_name.to_sym)
    else
      Kreegerator::IOS.send(method_name.to_sym, path_helper(options[:destination]), filename)
    end
  else
    puts "The generator you asked for ('#{method_name}') does not exist."
  end
end

#retina(method_name, glob = nil) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/kreegerator/cli.rb', line 26

def retina(method_name, glob=nil)
  if Kreegerator::Retina.respond_to?(method_name.to_sym)
    if method_name == 'list'
      Kreegerator::Retina.send(method_name.to_sym)
    else
      Kreegerator::Retina.send(method_name.to_sym, glob, options)
    end
  else
    puts "The action you asked for ('#{method_name}') does not exist."
  end
end