Sha256: fe62be32a914ed4184a4a81c79994d1128b31757a62480f14b98ba826343efcf

Contents?: true

Size: 529 Bytes

Versions: 19

Compression:

Stored size: 529 Bytes

Contents

require 'pathname'
require 'erb'
require 'find'
require 'pp'
require 'optparse'
require 'yaml'

require 'bitclust'
require 'bitclust/subcommand'

module BitClust
  module Subcommands
    class QueryCommand < Subcommand

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

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
bitclust-core-1.2.6 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.2.5 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.2.4 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.2.3 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.2.2 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.2.1 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.2.0 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.1.1 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.1.0 lib/bitclust/subcommands/query_command.rb
bitclust-core-1.0.0 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.9.6 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.9.5 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.9.4 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.9.3 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.9.2 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.9.1 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.9.0 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.8.0 lib/bitclust/subcommands/query_command.rb
bitclust-core-0.7.0 lib/bitclust/subcommands/query_command.rb