Class: PortunesServer::GemName

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}, version_text = '', banner_text = '') ⇒ GemName

Returns a new instance of GemName.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/portunes_server.rb', line 8

def initialize(args={}, version_text='', banner_text='')
  opts = Trollop::options(args) do
    banner = banner_text
    version = version_text
    opt :verbose, 'Verbose output.', short: 'v'
    opt :debug, 'Display additional debugging information.'
  end
  unless @cli_arg = args[0]
    Trollop::die "ERROR: You must specify something on the command line."
  end
  opts
end

Instance Attribute Details

#cli_argObject (readonly)

Returns the value of attribute cli_arg.



7
8
9
# File 'lib/portunes_server.rb', line 7

def cli_arg
  @cli_arg
end