class WhirledPeas::Settings::Spacing
Attributes
bottom[W]
left[W]
right[W]
top[W]
Public Instance Methods
bottom()
click to toggle source
# File lib/whirled_peas/settings/spacing.rb, line 34 def bottom @bottom || 0 end
horiz=(value)
click to toggle source
# File lib/whirled_peas/settings/spacing.rb, line 38 def horiz=(value) self.left = self.right = value end
left()
click to toggle source
# File lib/whirled_peas/settings/spacing.rb, line 10 def left @left || 0 end
right()
click to toggle source
# File lib/whirled_peas/settings/spacing.rb, line 26 def right @right || 0 end
top()
click to toggle source
# File lib/whirled_peas/settings/spacing.rb, line 18 def top @top || 0 end
vert=(value)
click to toggle source
# File lib/whirled_peas/settings/spacing.rb, line 42 def vert=(value) self.top = self.bottom = value end
Private Instance Methods
validate!(value)
click to toggle source
# File lib/whirled_peas/settings/spacing.rb, line 48 def validate!(value) if value && value < 0 raise ArgumentError, "Negative values for #{self.class.name.split('::').last.downcase} are not allowed" else value end end