Class: Component::Button::Cell
- Inherits:
-
Cell
- Object
- Cell
- Component::Button::Cell
- Defined in:
- app/cells/lato_view/component/button/cell.rb
Constant Summary collapse
- @@colors =
%w(normal yellow green red)- @@sizes =
%w(normal small)
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#size ⇒ Object
Returns the value of attribute size.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(title: '', url: '', color: 'normal', size: 'normal') ⇒ Cell
constructor
A new instance of Cell.
- #show ⇒ Object
Constructor Details
#initialize(title: '', url: '', color: 'normal', size: 'normal') ⇒ Cell
Returns a new instance of Cell.
9 10 11 12 13 14 15 16 17 |
# File 'app/cells/lato_view/component/button/cell.rb', line 9 def initialize(title: '', url: '', color: 'normal', size: 'normal') # save params @title = title @url = url @color = color @size = size # check params check_params end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
7 8 9 |
# File 'app/cells/lato_view/component/button/cell.rb', line 7 def color @color end |
#size ⇒ Object
Returns the value of attribute size.
7 8 9 |
# File 'app/cells/lato_view/component/button/cell.rb', line 7 def size @size end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'app/cells/lato_view/component/button/cell.rb', line 7 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
7 8 9 |
# File 'app/cells/lato_view/component/button/cell.rb', line 7 def url @url end |
Instance Method Details
#show ⇒ Object
19 20 21 |
# File 'app/cells/lato_view/component/button/cell.rb', line 19 def show render 'show.html' end |