Method: Celerity::SelectList#options

Defined in:
lib/celerity/elements/select_list.rb

#optionsArray<String>

Returns An array of strings representing the text value of the select list’s options.

Returns:

  • (Array<String>)

    An array of strings representing the text value of the select list’s options.



10
11
12
13
14
15
# File 'lib/celerity/elements/select_list.rb', line 10

def options
  assert_exists
  @object.getOptions.map do |e|
    e.asText.empty? ? e.getLabelAttribute : e.asText
  end
end