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
#call(program_name: File.basename($0)) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/plotty/command.rb', line 48 def call(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
44 45 46 |
# File 'lib/plotty/command.rb', line 44 def plot_graph Graph.parse([:x], [:y], @command).plot!([:script], [:name]) end |