class Plotty::Command::Top

Public Instance Methods

call(program_name: File.basename($0)) click to toggle source
# File lib/plotty/command.rb, line 48
def call(program_name: File.basename($0))
        if @options[:version]
                puts "plotty v#{Teapot::VERSION}"
        elsif @options[:help] or @command.nil?
                print_usage(program_name)
        else
                plot_graph
        end
end
plot_graph() click to toggle source
# File lib/plotty/command.rb, line 44
def plot_graph
        Graph.parse(options[:x], options[:y], @command).plot!(options[:script], options[:name])
end