Class: RubyvisCharts::Padding
- Inherits:
-
Object
- Object
- RubyvisCharts::Padding
- Defined in:
- lib/rubyvis_charts/padding.rb
Constant Summary collapse
- DEFAULT_PADDING =
0
Instance Attribute Summary collapse
-
#bottom ⇒ Object
readonly
Returns the value of attribute bottom.
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
Instance Method Summary collapse
-
#initialize(top: DEFAULT_PADDING, right: DEFAULT_PADDING, bottom: DEFAULT_PADDING, left: DEFAULT_PADDING) ⇒ Padding
constructor
A new instance of Padding.
Constructor Details
#initialize(top: DEFAULT_PADDING, right: DEFAULT_PADDING, bottom: DEFAULT_PADDING, left: DEFAULT_PADDING) ⇒ Padding
Returns a new instance of Padding.
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rubyvis_charts/padding.rb', line 7 def initialize( top: DEFAULT_PADDING, right: DEFAULT_PADDING, bottom: DEFAULT_PADDING, left: DEFAULT_PADDING ) @top = top @right = right @bottom = bottom @left = left end |
Instance Attribute Details
#bottom ⇒ Object (readonly)
Returns the value of attribute bottom.
5 6 7 |
# File 'lib/rubyvis_charts/padding.rb', line 5 def bottom @bottom end |
#left ⇒ Object (readonly)
Returns the value of attribute left.
5 6 7 |
# File 'lib/rubyvis_charts/padding.rb', line 5 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
5 6 7 |
# File 'lib/rubyvis_charts/padding.rb', line 5 def right @right end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
5 6 7 |
# File 'lib/rubyvis_charts/padding.rb', line 5 def top @top end |