Module: Card::Set::Type::File::Format
- Extended by:
- AbstractFormat
- Included in:
- Image::Format
- Defined in:
- platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb
Instance Method Summary collapse
-
#handle_source ⇒ Object
-
#selected_version ⇒ Object
-
#short_content ⇒ Object
-
#source ⇒ Object
-
#view: core ⇒ Object
-
#view: source ⇒ Object
Instance Method Details
#handle_source ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 40 def handle_source rescuing_file_source_error do src = source if src.blank? "" elsif block_given? yield src else src end end end |
#selected_version ⇒ Object
58 59 60 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 58 def selected_version card. end |
#short_content ⇒ Object
36 37 38 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 36 def short_content number_to_human_size card..size end |
#source ⇒ Object
53 54 55 56 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 53 def source file = card. file.valid? ? contextualize_path(file.url) : "" end |
#view: core ⇒ Object
30 31 32 33 34 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 30 view :core do handle_source do |source| card_url source end end |
#view: source ⇒ Object
26 27 28 |
# File 'platypus/tmp/set/gem-defaults/mod016-carrierwave/type/file.rb', line 26 view :source do source end |