Class: RubyvisCharts::Padding

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyvis_charts/padding.rb

Constant Summary collapse

DEFAULT_PADDING =
0

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bottomObject (readonly)

Returns the value of attribute bottom.



5
6
7
# File 'lib/rubyvis_charts/padding.rb', line 5

def bottom
  @bottom
end

#leftObject (readonly)

Returns the value of attribute left.



5
6
7
# File 'lib/rubyvis_charts/padding.rb', line 5

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



5
6
7
# File 'lib/rubyvis_charts/padding.rb', line 5

def right
  @right
end

#topObject (readonly)

Returns the value of attribute top.



5
6
7
# File 'lib/rubyvis_charts/padding.rb', line 5

def top
  @top
end