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.
-
#custom_class ⇒ Object
Returns the value of attribute custom_class.
-
#method ⇒ Object
Returns the value of attribute method.
-
#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', custom_class: '', method: 'get') ⇒ Cell
constructor
A new instance of Cell.
- #show ⇒ Object
Constructor Details
#initialize(title: '', url: '', color: 'normal', size: 'normal', custom_class: '', method: 'get') ⇒ Cell
Returns a new instance of Cell.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/cells/lato_view/component/button/cell.rb', line 9 def initialize(title: '', url: '', color: 'normal', size: 'normal', custom_class: '', method: 'get') # save params @title = title @url = url @color = color @size = size @method = method @custom_class = custom_class # 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 |
#custom_class ⇒ Object
Returns the value of attribute custom_class.
7 8 9 |
# File 'app/cells/lato_view/component/button/cell.rb', line 7 def custom_class @custom_class end |
#method ⇒ Object
Returns the value of attribute method.
7 8 9 |
# File 'app/cells/lato_view/component/button/cell.rb', line 7 def method @method 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
21 22 23 |
# File 'app/cells/lato_view/component/button/cell.rb', line 21 def show render 'show.html' end |