Class: Ben::CLI

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



11
12
13
14
15
16
17
# File 'lib/ben/cli.rb', line 11

def initialize(*)
  super
  o = @o = options.dup
  the_shell = (options["no-color"] ? Thor::Shell::Basic.new : shell)
  Ben.ui = UI::Shell.new(the_shell)
  Ben.ui.debug! if options["verbose"]
end

Instance Attribute Details

#oObject (readonly)

Returns the value of attribute o.



9
10
11
# File 'lib/ben/cli.rb', line 9

def o
  @o
end

Instance Method Details

#disk(p_disk = nil) ⇒ Object



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

def disk(p_disk=nil)
  p_disk ||= Rc.disk.disk

  Disk.run(p_disk.dup)
end