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
- #destination(site_destination_dir) ⇒ Object
- #destination_rel_dir ⇒ Object
- #extname ⇒ Object
- #modified? ⇒ Boolean
- #mtime ⇒ Object
- #path ⇒ Object
- #relative_path ⇒ Object
- #to_liquid ⇒ Object
- #write? ⇒ Boolean
Instance Method Details
#asset_destination_path ⇒ Object
11 12 13 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 11 def asset_destination_path File.join(asset_destination_dir, asset_destination_basename) end |
#destination(site_destination_dir) ⇒ Object
15 16 17 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 15 def destination(site_destination_dir) File.join(site_destination_dir, asset_destination_path) end |
#destination_rel_dir ⇒ Object
31 32 33 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 31 def destination_rel_dir asset_destination_dir end |
#extname ⇒ Object
19 20 21 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 19 def extname File.extname(relative_path) end |
#modified? ⇒ Boolean
27 28 29 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 27 def modified? stamped_at != mtime end |
#mtime ⇒ Object
23 24 25 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 23 def mtime File.stat(path).mtime.to_i end |
#path ⇒ Object
3 4 5 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 3 def path asset_source_path end |
#relative_path ⇒ Object
7 8 9 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 7 def relative_path path.sub(/\A#{@site.source}/, '') end |
#to_liquid ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 35 def to_liquid { 'path' => relative_path, 'modified_time' => mtime.to_s, 'extname' => extname } end |
#write? ⇒ Boolean
43 44 45 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 43 def write? true end |