Class: Locomotive::EditableFilePresenter
- Inherits:
-
EditableElementPresenter
- Object
- BasePresenter
- EditableElementPresenter
- Locomotive::EditableFilePresenter
- Defined in:
- app/presenters/locomotive/editable_file_presenter.rb
Instance Attribute Summary
Attributes inherited from BasePresenter
Instance Method Summary collapse
-
#content ⇒ Object
properties ##.
-
#filename ⇒ Object
other getters / setters ##.
- #source=(value) ⇒ Object
- #source_url=(url) ⇒ Object
- #url ⇒ Object
Methods inherited from EditableElementPresenter
#block_name, #label, #slug, #type
Methods inherited from BasePresenter
#ability?, #after_initialize, getters_to_hash, #id, setters_to_hash, #site
Methods included from Presentable
#after_initialize, #as_json, #attributes=, #getters, #initialize, #property_options, #setters
Instance Method Details
#content ⇒ Object
properties ##
6 |
# File 'app/presenters/locomotive/editable_file_presenter.rb', line 6 property :content |
#filename ⇒ Object
other getters / setters ##
12 13 14 |
# File 'app/presenters/locomotive/editable_file_presenter.rb', line 12 def filename File.basename(self.content) end |
#source=(value) ⇒ Object
20 21 22 |
# File 'app/presenters/locomotive/editable_file_presenter.rb', line 20 def source=(value) self.source.source = value end |
#source_url=(url) ⇒ Object
24 25 26 |
# File 'app/presenters/locomotive/editable_file_presenter.rb', line 24 def source_url=(url) self.source.remote_source_url = url end |
#url ⇒ Object
16 17 18 |
# File 'app/presenters/locomotive/editable_file_presenter.rb', line 16 def url self.content end |