Class: Grada::Gnuplot::Style
- Inherits:
-
Object
- Object
- Grada::Gnuplot::Style
- Defined in:
- lib/grada/types/gnuplot.rb
Constant Summary collapse
- STYLES =
[:ls, :lt, :lw, :lc, :pt, :ps, :fs]
Instance Attribute Summary collapse
-
#fill ⇒ Object
(also: #fs)
Returns the value of attribute fill.
-
#index ⇒ Object
Returns the value of attribute index.
-
#linecolor ⇒ Object
(also: #lc)
Returns the value of attribute linecolor.
-
#linestyle ⇒ Object
(also: #ls)
Returns the value of attribute linestyle.
-
#linetype ⇒ Object
(also: #lt)
Returns the value of attribute linetype.
-
#linewidth ⇒ Object
(also: #lw)
Returns the value of attribute linewidth.
-
#pointsize ⇒ Object
(also: #ps)
Returns the value of attribute pointsize.
-
#pointtype ⇒ Object
(also: #pt)
Returns the value of attribute pointtype.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Style
constructor
A new instance of Style.
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#fill ⇒ Object Also known as: fs
Returns the value of attribute fill.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def fill @fill end |
#index ⇒ Object
Returns the value of attribute index.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def index @index end |
#linecolor ⇒ Object Also known as: lc
Returns the value of attribute linecolor.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def linecolor @linecolor end |
#linestyle ⇒ Object Also known as: ls
Returns the value of attribute linestyle.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def linestyle @linestyle end |
#linetype ⇒ Object Also known as: lt
Returns the value of attribute linetype.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def linetype @linetype end |
#linewidth ⇒ Object Also known as: lw
Returns the value of attribute linewidth.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def linewidth @linewidth end |
#pointsize ⇒ Object Also known as: ps
Returns the value of attribute pointsize.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def pointsize @pointsize end |
#pointtype ⇒ Object Also known as: pt
Returns the value of attribute pointtype.
118 119 120 |
# File 'lib/grada/types/gnuplot.rb', line 118 def pointtype @pointtype end |
Class Method Details
.increment_index ⇒ Object
138 139 140 141 |
# File 'lib/grada/types/gnuplot.rb', line 138 def self.increment_index @index ||= 0 @index += 1 end |
Instance Method Details
#to_s ⇒ Object
152 153 154 155 156 157 158 159 160 |
# File 'lib/grada/types/gnuplot.rb', line 152 def to_s str = ' ' STYLES.each do |style| str += " #{style} #{send(style)}" if send(style) end str == ' ' ? '' : str end |