Class: Neofiles::Swf
Defined Under Namespace
Classes: SwfFormatException
Instance Attribute Summary
Attributes inherited from File
Instance Method Summary collapse
-
#admin_compact_view(view_context) ⇒ Object
Overrides parent “admin views” with square 100x100 Flash thumbnail.
-
#dimensions ⇒ Object
Return array with width & height decorated with singleton function to_s returning ‘WxH’ string.
Methods inherited from File
#base64, class_by_content_type, class_by_file_name, class_by_file_object, cleanname, #data, #data_uri, extract_basename, extract_content_type, get_stores_class_name, #nullify_unpersisted_file, read_data_stores, #save_file, #unpersisted_file?, write_data_stores
Instance Method Details
#admin_compact_view(view_context) ⇒ Object
Overrides parent “admin views” with square 100x100 Flash thumbnail.
26 27 28 |
# File 'app/models/neofiles/swf.rb', line 26 def admin_compact_view(view_context) view_context.neofiles_link self, view_context.tag(:img, src: view_context.image_path('neofiles/swf-thumb-100x100.png')), target: '_blank' end |
#dimensions ⇒ Object
Return array with width & height decorated with singleton function to_s returning ‘WxH’ string.
17 18 19 20 21 22 23 |
# File 'app/models/neofiles/swf.rb', line 17 def dimensions dim = [width, height] def dim.to_s join 'x' end dim end |