Class: Marquetapage::Runner

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

Overview

Execute sql command to sqlite

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.run(args) ⇒ Integer

Execute query and output as json the result

Examples:

run()

Parameters:

  • args (ARGV)

    must include a tag

Returns:

  • (Integer)

    Exit status



11
12
13
# File 'lib/marquetapage/runner.rb', line 11

def self.run(args)
  new.run(args)
end

Instance Method Details

#run(args) ⇒ Integer

Execute query and output as json the result

Examples:

run()

Parameters:

  • args (ARGV)

    must include a tag

Returns:

  • (Integer)

    Exit status

Raises:

  • (ArgumentError)


19
20
21
22
23
24
25
# File 'lib/marquetapage/runner.rb', line 19

def run(args)
  raise ArgumentError unless args
  usage if args.empty?
  trap_interrupt
  @tag_name = args.first
  output_bookmarks
end