Class: Plotty::Command::Top
- Inherits:
-
Samovar::Command
- Object
- Samovar::Command
- Plotty::Command::Top
- Defined in:
- lib/plotty/command.rb
Instance Method Summary collapse
Instance Method Details
#invoke(program_name: File.basename($0)) ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/plotty/command.rb', line 50 def invoke(program_name: File.basename($0)) if [:version] puts "plotty v#{Teapot::VERSION}" elsif [:help] or @command.nil? print_usage(program_name) else plot_graph end end |
#plot_graph ⇒ Object
46 47 48 |
# File 'lib/plotty/command.rb', line 46 def plot_graph Graph.parse([:x], [:y], @command).plot!([:script]) end |