Method: DataField#get

Defined in:
lib/asker/data/data_field.rb

#get(option = :raw) ⇒ Object

Return internal data rubocop:disable Metrics/MethodLength

Parameters:

  • option (Symbol) (defaults to: :raw)

Returns:

  • String



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/asker/data/data_field.rb', line 24

def get(option = :raw)
  case @type
  when :text
    return get_text(option)
  when :textfile_path
    return get_textfile_path(option)
  when :textfile_url
    return get_textfile_url(option)
  when :image_url
    return get_image_url(option)
  end
  raise ".get: data=#{@data}, type=#{@type}, option=#{option}"
end