Module: Jekyll::Minibundle::AssetFileProperties
- Included in:
- BundleFile, DevelopmentFile, StampFile
- Defined in:
- lib/jekyll/minibundle/asset_file_properties.rb
Instance Method Summary collapse
- #asset_destination_path ⇒ Object
- #basename ⇒ Object
- #data ⇒ Object
- #defaults ⇒ Object
- #destination(site_destination_dir) ⇒ Object
- #destination_rel_dir ⇒ Object
- #modified_time ⇒ Object
- #mtime ⇒ Object
- #name ⇒ Object
-
#path ⇒ Object
Conformance to remaining Jekyll StaticFile public API methods.
- #placeholders ⇒ Object
- #relative_path ⇒ Object
- #to_liquid ⇒ Object
- #type ⇒ Object
- #url ⇒ Object
- #write? ⇒ Boolean
Instance Method Details
#asset_destination_path ⇒ Object
5 6 7 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 5 def asset_destination_path File.join(asset_destination_dir, asset_destination_filename) end |
#basename ⇒ Object
31 32 33 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 31 def basename File.basename(name, extname) end |
#data ⇒ Object
51 52 53 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 51 def data {} end |
#defaults ⇒ Object
63 64 65 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 63 def defaults {} end |
#destination(site_destination_dir) ⇒ Object
19 20 21 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 19 def destination(site_destination_dir) File.(File.join(site_destination_dir, asset_destination_path), '/') end |
#destination_rel_dir ⇒ Object
43 44 45 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 43 def destination_rel_dir "/#{asset_destination_dir}" end |
#modified_time ⇒ Object
35 36 37 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 35 def modified_time File.stat(path).mtime end |
#mtime ⇒ Object
39 40 41 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 39 def mtime modified_time.to_i end |
#name ⇒ Object
27 28 29 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 27 def name asset_destination_filename end |
#path ⇒ Object
Conformance to remaining Jekyll StaticFile public API methods
11 12 13 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 11 def path asset_source_path end |
#placeholders ⇒ Object
67 68 69 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 67 def placeholders {} end |
#relative_path ⇒ Object
15 16 17 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 15 def relative_path path.sub(/\A#{@site.source}/, '') end |
#to_liquid ⇒ Object
47 48 49 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 47 def to_liquid AssetFileDrop.new(self) end |
#type ⇒ Object
59 60 61 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 59 def type nil # no collection present end |
#url ⇒ Object
23 24 25 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 23 def url asset_destination_path end |
#write? ⇒ Boolean
55 56 57 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 55 def write? true end |