class Locomotive::Steam::ContentEntry::FileField
Represent a file
Public Instance Methods
to_hash()
click to toggle source
# File lib/locomotive/steam/entities/content_entry.rb, line 238 def to_hash { 'url' => url, 'filename' => filename, 'size' => size, 'updated_at' => updated_at } end
to_json()
click to toggle source
# File lib/locomotive/steam/entities/content_entry.rb, line 242 def to_json url end
to_liquid()
click to toggle source
# File lib/locomotive/steam/entities/content_entry.rb, line 246 def to_liquid Locomotive::Steam::Liquid::Drops::UploadedFile.new(self) end
url()
click to toggle source
# File lib/locomotive/steam/entities/content_entry.rb, line 233 def url return if filename.blank? base.blank? ? filename : "#{base}/#{filename}" end