Class: MotionPlot::Axis
- Inherits:
-
Object
- Object
- MotionPlot::Axis
- Defined in:
- lib/motion-plot/utilities/axis.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#style ⇒ Object
Returns the value of attribute style.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #enabled? ⇒ Boolean
-
#initialize(args) ⇒ Axis
constructor
A new instance of Axis.
- #is_x? ⇒ Boolean
- #is_y? ⇒ Boolean
- #text_style ⇒ Object
Constructor Details
#initialize(args) ⇒ Axis
Returns a new instance of Axis.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/motion-plot/utilities/axis.rb', line 5 def initialize(args) args.each_pair {|key, value| send("#{key}=", value) if(respond_to?("#{key}=")) } if(args[:title]) @title = Title.new(args[:title]) end if(args[:style]) @style = Style.new(args[:style]) else @style = Style.new end end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
3 4 5 |
# File 'lib/motion-plot/utilities/axis.rb', line 3 def enabled @enabled end |
#labels ⇒ Object
Returns the value of attribute labels.
3 4 5 |
# File 'lib/motion-plot/utilities/axis.rb', line 3 def labels @labels end |
#style ⇒ Object
Returns the value of attribute style.
3 4 5 |
# File 'lib/motion-plot/utilities/axis.rb', line 3 def style @style end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/motion-plot/utilities/axis.rb', line 3 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/motion-plot/utilities/axis.rb', line 3 def type @type end |
Instance Method Details
#enabled? ⇒ Boolean
33 34 35 |
# File 'lib/motion-plot/utilities/axis.rb', line 33 def enabled? enabled end |
#is_x? ⇒ Boolean
25 26 27 |
# File 'lib/motion-plot/utilities/axis.rb', line 25 def is_x? type == "xaxis" end |
#is_y? ⇒ Boolean
29 30 31 |
# File 'lib/motion-plot/utilities/axis.rb', line 29 def is_y? type == "yaxis" end |
#text_style ⇒ Object
21 22 23 |
# File 'lib/motion-plot/utilities/axis.rb', line 21 def text_style TextStyle.cpt_text_style(@style) end |