Class: ConceptQL::CLI
- Inherits:
-
Thor
- Object
- Thor
- ConceptQL::CLI
- Includes:
- Sequelizer
- Defined in:
- lib/conceptql/cli.rb
Instance Method Summary collapse
- #fake_graph(file) ⇒ Object
- #run_statement(statement_file) ⇒ Object
- #show_and_tell_file(file) ⇒ Object
- #show_graph(file) ⇒ Object
Instance Method Details
#fake_graph(file) ⇒ Object
57 58 59 60 61 |
# File 'lib/conceptql/cli.rb', line 57 def fake_graph(file) require_relative 'fake_grapher' ConceptQL::FakeGrapher.new.graph_it(criteria_from_file(file), '/tmp/graph') system('open /tmp/graph.pdf') end |
#run_statement(statement_file) ⇒ Object
38 39 40 41 42 43 |
# File 'lib/conceptql/cli.rb', line 38 def run_statement(statement_file) q = ConceptQL::Query.new(db(), criteria_from_file(statement_file)) puts q.sql puts q.statement.to_yaml pp q.execute end |
#show_and_tell_file(file) ⇒ Object
52 53 54 |
# File 'lib/conceptql/cli.rb', line 52 def show_and_tell_file(file) show_and_tell(criteria_from_file(file), ) end |
#show_graph(file) ⇒ Object
46 47 48 |
# File 'lib/conceptql/cli.rb', line 46 def show_graph(file) graph_it(criteria_from_file(file)) end |