Class: Treemap::OutputBase
- Inherits:
-
Object
- Object
- Treemap::OutputBase
- Defined in:
- lib/treemap/output_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#height ⇒ Object
Returns the value of attribute height.
-
#layout ⇒ Object
Returns the value of attribute layout.
-
#margin_left ⇒ Object
Returns the value of attribute margin_left.
-
#margin_top ⇒ Object
Returns the value of attribute margin_top.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ OutputBase
constructor
A new instance of OutputBase.
Constructor Details
#initialize {|_self| ... } ⇒ OutputBase
Returns a new instance of OutputBase.
19 20 21 22 23 24 25 26 27 |
# File 'lib/treemap/output_base.rb', line 19 def initialize @width = 800 @height = 600 @margin_top = 0 @margin_left = 0 @layout = Treemap::SquarifiedLayout.new @color = Treemap::GradientColor.new yield self if block_given? end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
17 18 19 |
# File 'lib/treemap/output_base.rb', line 17 def color @color end |
#height ⇒ Object
Returns the value of attribute height.
17 18 19 |
# File 'lib/treemap/output_base.rb', line 17 def height @height end |
#layout ⇒ Object
Returns the value of attribute layout.
17 18 19 |
# File 'lib/treemap/output_base.rb', line 17 def layout @layout end |
#margin_left ⇒ Object
Returns the value of attribute margin_left.
17 18 19 |
# File 'lib/treemap/output_base.rb', line 17 def margin_left @margin_left end |
#margin_top ⇒ Object
Returns the value of attribute margin_top.
17 18 19 |
# File 'lib/treemap/output_base.rb', line 17 def margin_top @margin_top end |
#width ⇒ Object
Returns the value of attribute width.
17 18 19 |
# File 'lib/treemap/output_base.rb', line 17 def width @width end |