Class: BitClust::Subcommands::QueryCommand

Inherits:
BitClust::Subcommand show all
Defined in:
lib/bitclust/subcommands/query_command.rb

Instance Method Summary collapse

Methods inherited from BitClust::Subcommand

#align_progress_bar_title, #error, #help, #option_error, #parse, #srcdir_root

Constructor Details

#initializeQueryCommand

Returns a new instance of QueryCommand.



16
17
18
19
# File 'lib/bitclust/subcommands/query_command.rb', line 16

def initialize
  super
  @parser.banner = "Usage: #{File.basename($0, '.*')} query <ruby-script>"
end

Instance Method Details

#exec(argv, options) ⇒ Object



21
22
23
24
25
26
# File 'lib/bitclust/subcommands/query_command.rb', line 21

def exec(argv, options)
  argv.each do |query|
    # pp eval(query)   # FIXME: causes ArgumentError
    p eval(query)
  end
end