Class: WhirledPeas::Settings::Border
- Inherits:
-
Object
- Object
- WhirledPeas::Settings::Border
show all
- Defined in:
- lib/whirled_peas/settings/border.rb
Defined Under Namespace
Modules: Styles
Classes: Style
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(theme) ⇒ Border
Returns a new instance of Border.
64
65
66
|
# File 'lib/whirled_peas/settings/border.rb', line 64
def initialize(theme)
@theme = theme
end
|
Instance Attribute Details
#bottom=(value) ⇒ Object
Sets the attribute bottom
62
63
64
|
# File 'lib/whirled_peas/settings/border.rb', line 62
def bottom=(value)
@bottom = value
end
|
#inner_horiz=(value) ⇒ Object
Sets the attribute inner_horiz
62
63
64
|
# File 'lib/whirled_peas/settings/border.rb', line 62
def inner_horiz=(value)
@inner_horiz = value
end
|
#inner_vert=(value) ⇒ Object
Sets the attribute inner_vert
62
63
64
|
# File 'lib/whirled_peas/settings/border.rb', line 62
def inner_vert=(value)
@inner_vert = value
end
|
#left=(value) ⇒ Object
62
63
64
|
# File 'lib/whirled_peas/settings/border.rb', line 62
def left=(value)
@left = value
end
|
#right=(value) ⇒ Object
62
63
64
|
# File 'lib/whirled_peas/settings/border.rb', line 62
def right=(value)
@right = value
end
|
#theme ⇒ Object
Returns the value of attribute theme.
60
61
62
|
# File 'lib/whirled_peas/settings/border.rb', line 60
def theme
@theme
end
|
#top=(value) ⇒ Object
62
63
64
|
# File 'lib/whirled_peas/settings/border.rb', line 62
def top=(value)
@top = value
end
|
Class Method Details
.inherit(parent) ⇒ Object
54
55
56
57
58
|
# File 'lib/whirled_peas/settings/border.rb', line 54
def self.inherit(parent)
border = new(parent.theme)
border.inherit(parent)
border
end
|
Instance Method Details
#bottom? ⇒ Boolean
80
81
82
|
# File 'lib/whirled_peas/settings/border.rb', line 80
def bottom?
@bottom == true
end
|
#color ⇒ Object
108
109
110
|
# File 'lib/whirled_peas/settings/border.rb', line 108
def color
@_color || theme.border_color
end
|
#color=(val) ⇒ Object
104
105
106
|
# File 'lib/whirled_peas/settings/border.rb', line 104
def color=(val)
@_color = TextColor.validate!(val)
end
|
#inherit(parent) ⇒ Object
112
113
114
115
|
# File 'lib/whirled_peas/settings/border.rb', line 112
def inherit(parent)
@_style = parent._style
@_color = parent._color
end
|
#inner_horiz? ⇒ Boolean
84
85
86
|
# File 'lib/whirled_peas/settings/border.rb', line 84
def inner_horiz?
@inner_horiz == true
end
|
#inner_vert? ⇒ Boolean
88
89
90
|
# File 'lib/whirled_peas/settings/border.rb', line 88
def inner_vert?
@inner_vert == true
end
|
#left? ⇒ Boolean
68
69
70
|
# File 'lib/whirled_peas/settings/border.rb', line 68
def left?
@left == true
end
|
#outer? ⇒ Boolean
92
93
94
|
# File 'lib/whirled_peas/settings/border.rb', line 92
def outer?
left? || top? || right? || bottom?
end
|
#right? ⇒ Boolean
76
77
78
|
# File 'lib/whirled_peas/settings/border.rb', line 76
def right?
@right == true
end
|
#style ⇒ Object
96
97
98
|
# File 'lib/whirled_peas/settings/border.rb', line 96
def style
@_style || theme.border_style || Styles::DEFAULT
end
|
#style=(val) ⇒ Object
100
101
102
|
# File 'lib/whirled_peas/settings/border.rb', line 100
def style=(val)
@_style = Styles.validate!(val)
end
|
#top? ⇒ Boolean
72
73
74
|
# File 'lib/whirled_peas/settings/border.rb', line 72
def top?
@top == true
end
|