Class: HCUtil::CLI

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

Instance Method Summary collapse

Instance Method Details

#copy(room_name) ⇒ Object



38
39
40
41
42
43
44
45
# File 'lib/hcutil/cli.rb', line 38

def copy(room_name)
  begin
    copier = HCUtil::Copier.new(room_name, options)
    copier.copy()
  rescue Errors::HCUtilError => e
    $stderr.puts("[error] #{e.message}")
  end
end

#paste(thing) ⇒ Object



61
62
63
64
65
66
67
68
# File 'lib/hcutil/cli.rb', line 61

def paste(thing)
  begin
    paster = HCUtil::Paster.new(thing, options)
    paster.paste()
  rescue Errors::HCUtilError => e
    $stderr.puts("[error] #{e.message}")
  end
end

#versionObject



23
24
25
# File 'lib/hcutil/cli.rb', line 23

def version()
  puts("version: #{HCUtil::VERSION}")
end