Class: Trek::ContentEditor::Image
- Inherits:
-
Object
- Object
- Trek::ContentEditor::Image
- Extended by:
- ActiveModel::Translation
- Includes:
- ActiveModel::Model, ActiveModel::Validations, ActiveModel::Validations::Callbacks
- Defined in:
- app/models/trek/content_editor/image.rb
Constant Summary collapse
- SIZES =
%i[default larger].freeze
Instance Attribute Summary collapse
-
#alt ⇒ Object
Returns the value of attribute alt.
-
#credit ⇒ Object
Returns the value of attribute credit.
-
#file_data ⇒ Object
Returns the value of attribute file_data.
-
#id ⇒ Object
Returns the value of attribute id.
-
#size ⇒ Object
Returns the value of attribute size.
-
#text ⇒ Object
Returns the value of attribute text.
-
#turbo_frame_id ⇒ Object
Returns the value of attribute turbo_frame_id.
Class Method Summary collapse
Instance Attribute Details
#alt ⇒ Object
Returns the value of attribute alt.
11 12 13 |
# File 'app/models/trek/content_editor/image.rb', line 11 def alt @alt end |
#credit ⇒ Object
Returns the value of attribute credit.
11 12 13 |
# File 'app/models/trek/content_editor/image.rb', line 11 def credit @credit end |
#file_data ⇒ Object
Returns the value of attribute file_data.
11 12 13 |
# File 'app/models/trek/content_editor/image.rb', line 11 def file_data @file_data end |
#id ⇒ Object
Returns the value of attribute id.
11 12 13 |
# File 'app/models/trek/content_editor/image.rb', line 11 def id @id end |
#size ⇒ Object
Returns the value of attribute size.
11 12 13 |
# File 'app/models/trek/content_editor/image.rb', line 11 def size @size end |
#text ⇒ Object
Returns the value of attribute text.
11 12 13 |
# File 'app/models/trek/content_editor/image.rb', line 11 def text @text end |
#turbo_frame_id ⇒ Object
Returns the value of attribute turbo_frame_id.
11 12 13 |
# File 'app/models/trek/content_editor/image.rb', line 11 def turbo_frame_id @turbo_frame_id end |
Class Method Details
.size_options ⇒ Object
19 20 21 22 23 |
# File 'app/models/trek/content_editor/image.rb', line 19 def self. SIZES.map do |size| [I18n.t("activemodel.options.trek/content_editor/image.size.#{size}"), size] end end |