Class: FactoryForm::ImageData

Inherits:
Field
  • Object
show all
Defined in:
lib/factoryform/image_data.rb

Instance Attribute Summary collapse

Attributes inherited from Field

#field_type, #hint, #id, #label, #required, #unique, #validation_format

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ImageData

Returns a new instance of ImageData.



5
6
7
8
9
10
# File 'lib/factoryform/image_data.rb', line 5

def initialize(options = {})
  options[:field_type] = "image_data"
  @url = options[:url] || options[:label]
  @alt = options[:alt] || options[:label]
  super(options)
end

Instance Attribute Details

#altObject

Returns the value of attribute alt.



3
4
5
# File 'lib/factoryform/image_data.rb', line 3

def alt
  @alt
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/factoryform/image_data.rb', line 3

def url
  @url
end