Class: Fields::TextField

Inherits:
Field
  • Object
show all
Includes:
LengthConstrained
Defined in:
app/models/iron/fields/text_field.rb

Instance Method Summary collapse

Instance Method Details

#content_value=(value) ⇒ Object



7
8
9
# File 'app/models/iron/fields/text_field.rb', line 7

def content_value=(value)
  self.value_string = value
end

#export_valueObject



21
22
23
# File 'app/models/iron/fields/text_field.rb', line 21

def export_value
  { type: "text_field", value: value_string }
end

#filled?Boolean

Returns:



11
# File 'app/models/iron/fields/text_field.rb', line 11

def filled? = value_string.present?

#searchable_textObject



13
14
15
# File 'app/models/iron/fields/text_field.rb', line 13

def searchable_text
  value
end

#valueObject



17
18
19
# File 'app/models/iron/fields/text_field.rb', line 17

def value
  value_string
end