Class: PortunesServer::GemName
- Inherits:
-
Object
- Object
- PortunesServer::GemName
- Defined in:
- lib/portunes_server.rb
Instance Attribute Summary collapse
-
#cli_arg ⇒ Object
readonly
Returns the value of attribute cli_arg.
Instance Method Summary collapse
-
#initialize(args = {}, version_text = '', banner_text = '') ⇒ GemName
constructor
A new instance of GemName.
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='', ='') opts = Trollop::(args) do = 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_arg ⇒ Object (readonly)
Returns the value of attribute cli_arg.
7 8 9 |
# File 'lib/portunes_server.rb', line 7 def cli_arg @cli_arg end |