Class: Component::Buttonprompt::Cell

Inherits:
Cell
  • Object
show all
Defined in:
app/cells/lato_view/component/buttonprompt/cell.rb

Constant Summary collapse

@@colors =
%w(normal yellow green red)
@@sizes =
%w(normal small xsmall)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title: '', url: '', color: 'normal', size: 'normal', custom_class: '', data_popup_text: '', data_popup_no: '', data_popup_ok: '', custom_method: 'get') ⇒ Cell

Returns a new instance of Cell.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 9

def initialize(title: '', url: '', color: 'normal', size: 'normal', 
               custom_class: '', data_popup_text: '', 
               data_popup_no: '', data_popup_ok: '', custom_method: 'get')

 # save params
  @title = title
  @url = url
  @color = color
  @size = size
  @custom_class = custom_class
  @data_popup_text = data_popup_text
  @data_popup_no = data_popup_no
  @data_popup_ok = data_popup_ok
  @custom_method = custom_method
  # check params
  check_params
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def color
  @color
end

#custom_classObject

Returns the value of attribute custom_class.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def custom_class
  @custom_class
end

#custom_methodObject

Returns the value of attribute custom_method.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def custom_method
  @custom_method
end

#data_popup_noObject

Returns the value of attribute data_popup_no.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def data_popup_no
  @data_popup_no
end

#data_popup_okObject

Returns the value of attribute data_popup_ok.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def data_popup_ok
  @data_popup_ok
end

#data_popup_textObject

Returns the value of attribute data_popup_text.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def data_popup_text
  @data_popup_text
end

#sizeObject

Returns the value of attribute size.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def size
  @size
end

#titleObject

Returns the value of attribute title.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def title
  @title
end

#urlObject

Returns the value of attribute url.



7
8
9
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 7

def url
  @url
end

Instance Method Details

#showObject



27
28
29
# File 'app/cells/lato_view/component/buttonprompt/cell.rb', line 27

def show
  render 'show.html'
end