Class: Input::Map::Cell

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

Constant Summary collapse

@@widths =
VIEW_INPUTWIDTH

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name_lat: 'lat', name_lng: 'lng', name_address: 'address_input', value_lat: '', value_lng: '', value_address: '', placeholder: '', label: '', width: 'large', required: false, disabled: false, custom_class: '') ⇒ Cell

Returns a new instance of Cell.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/cells/lato_view/input/map/cell.rb', line 11

def initialize(name_lat: 'lat', name_lng: 'lng', name_address: 'address_input',
               value_lat: '', value_lng: '', value_address: '',
               placeholder: '', label: '', width: 'large', 
               required: false, disabled: false, custom_class: '')
  # save params
  @name_lat = name_lat
  @name_lng = name_lng
  @name_address = name_address
  @value_lat = value_lat
  @value_lng = value_lng
  @value_address = value_address

  @placeholder = placeholder
  @width = width
  @label = label
  @required = required
  @disabled = disabled
  @custom_class = custom_class

  # check params
  check_params
end

Instance Attribute Details

#custom_classObject

Returns the value of attribute custom_class.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def custom_class
  @custom_class
end

#disabledObject

Returns the value of attribute disabled.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def disabled
  @disabled
end

#labelObject

Returns the value of attribute label.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def label
  @label
end

#name_addressObject

Returns the value of attribute name_address.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def name_address
  @name_address
end

#name_latObject

Returns the value of attribute name_lat.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def name_lat
  @name_lat
end

#name_lngObject

Returns the value of attribute name_lng.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def name_lng
  @name_lng
end

#placeholderObject

Returns the value of attribute placeholder.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def placeholder
  @placeholder
end

#requiredObject

Returns the value of attribute required.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def required
  @required
end

#value_addressObject

Returns the value of attribute value_address.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def value_address
  @value_address
end

#value_latObject

Returns the value of attribute value_lat.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def value_lat
  @value_lat
end

#value_lngObject

Returns the value of attribute value_lng.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def value_lng
  @value_lng
end

#widthObject

Returns the value of attribute width.



6
7
8
# File 'app/cells/lato_view/input/map/cell.rb', line 6

def width
  @width
end

Instance Method Details

#showObject



34
35
36
# File 'app/cells/lato_view/input/map/cell.rb', line 34

def show
  render "show.html"
end