Class: FactoryForm::ImageData
- Defined in:
- lib/factoryform/image_data.rb
Instance Attribute Summary collapse
-
#alt ⇒ Object
Returns the value of attribute alt.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from Field
#field_type, #hint, #id, #label, #required, #unique, #validation_format
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ImageData
constructor
A new instance of ImageData.
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( = {}) [:field_type] = "image_data" @url = [:url] || [:label] @alt = [:alt] || [:label] super() end |
Instance Attribute Details
#alt ⇒ Object
Returns the value of attribute alt.
3 4 5 |
# File 'lib/factoryform/image_data.rb', line 3 def alt @alt end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/factoryform/image_data.rb', line 3 def url @url end |