From 3b8846efbe995d1becc972d16d0afe038ecdb8bb Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Tue, 15 Sep 2020 18:58:25 +0900 Subject: [PATCH] Add new file params.rb --- lib/uplot/command.rb | 27 --------------------------- lib/uplot/command/params.rb | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 lib/uplot/command/params.rb diff --git a/lib/uplot/command.rb b/lib/uplot/command.rb index 8f82e6b..292bde0 100644 --- a/lib/uplot/command.rb +++ b/lib/uplot/command.rb @@ -5,33 +5,6 @@ module Uplot Data = Struct.new(:headers, :series) class Command - Params = Struct.new( - # Sort me! - :title, - :width, - :height, - :border, - :margin, - :padding, - :color, - :xlabel, - :ylabel, - :labels, - :symbol, - :xscale, - :nbins, - :closed, - :canvas, - :xlim, - :ylim, - :grid, - :name - ) do - def to_hc - to_h.compact - end - end - attr_accessor :params, :command attr_reader :raw_inputs, :data, :fmt diff --git a/lib/uplot/command/params.rb b/lib/uplot/command/params.rb new file mode 100644 index 0000000..1b5d6a2 --- /dev/null +++ b/lib/uplot/command/params.rb @@ -0,0 +1,30 @@ +module Uplot + class Command + Params = Struct.new( + # Sort me! + :title, + :width, + :height, + :border, + :margin, + :padding, + :color, + :xlabel, + :ylabel, + :labels, + :symbol, + :xscale, + :nbins, + :closed, + :canvas, + :xlim, + :ylim, + :grid, + :name + ) do + def to_hc + to_h.compact + end + end + end +end