Class: YouPlot::Command::Params
- Inherits:
-
Struct
- Object
- Struct
- YouPlot::Command::Params
- Defined in:
- lib/youplot/command/params.rb
Overview
UnicodePlot parameters.
-
Normally in a Ruby program, you might use hash for the parameter object.
-
Here, I use Struct for 2 safety reason.
-
The keys are static in Struct.
-
Struct does not conflict with keyword arguments. Hash dose.
Instance Attribute Summary collapse
-
#border ⇒ Object
Returns the value of attribute border.
-
#canvas ⇒ Object
Returns the value of attribute canvas.
-
#closed ⇒ Object
Returns the value of attribute closed.
-
#color ⇒ Object
Returns the value of attribute color.
-
#grid ⇒ Object
Returns the value of attribute grid.
-
#height ⇒ Object
Returns the value of attribute height.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#margin ⇒ Object
Returns the value of attribute margin.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nbins ⇒ Object
Returns the value of attribute nbins.
-
#padding ⇒ Object
Returns the value of attribute padding.
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#title ⇒ Object
Returns the value of attribute title.
-
#width ⇒ Object
Returns the value of attribute width.
-
#xlabel ⇒ Object
Returns the value of attribute xlabel.
-
#xlim ⇒ Object
Returns the value of attribute xlim.
-
#xscale ⇒ Object
Returns the value of attribute xscale.
-
#ylabel ⇒ Object
Returns the value of attribute ylabel.
-
#ylim ⇒ Object
Returns the value of attribute ylim.
Instance Method Summary collapse
Instance Attribute Details
#border ⇒ Object
Returns the value of attribute border
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def border @border end |
#canvas ⇒ Object
Returns the value of attribute canvas
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def canvas @canvas end |
#closed ⇒ Object
Returns the value of attribute closed
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def closed @closed end |
#color ⇒ Object
Returns the value of attribute color
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def color @color end |
#grid ⇒ Object
Returns the value of attribute grid
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def grid @grid end |
#height ⇒ Object
Returns the value of attribute height
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def height @height end |
#labels ⇒ Object
Returns the value of attribute labels
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def labels @labels end |
#margin ⇒ Object
Returns the value of attribute margin
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def margin @margin end |
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def name @name end |
#nbins ⇒ Object
Returns the value of attribute nbins
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def nbins @nbins end |
#padding ⇒ Object
Returns the value of attribute padding
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def padding @padding end |
#symbol ⇒ Object
Returns the value of attribute symbol
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def symbol @symbol end |
#title ⇒ Object
Returns the value of attribute title
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def title @title end |
#width ⇒ Object
Returns the value of attribute width
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def width @width end |
#xlabel ⇒ Object
Returns the value of attribute xlabel
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def xlabel @xlabel end |
#xlim ⇒ Object
Returns the value of attribute xlim
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def xlim @xlim end |
#xscale ⇒ Object
Returns the value of attribute xscale
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def xscale @xscale end |
#ylabel ⇒ Object
Returns the value of attribute ylabel
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def ylabel @ylabel end |
#ylim ⇒ Object
Returns the value of attribute ylim
10 11 12 |
# File 'lib/youplot/command/params.rb', line 10 def ylim @ylim end |
Instance Method Details
#to_hc ⇒ Object
32 33 34 |
# File 'lib/youplot/command/params.rb', line 32 def to_hc to_h.compact end |