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
- #defaults ⇒ Object
- #destination(site_destination_dir) ⇒ Object
- #destination_rel_dir ⇒ Object
- #modified? ⇒ Boolean
- #modified_time ⇒ Object
- #mtime ⇒ 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
3 4 5 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 3 def asset_destination_path File.join(asset_destination_dir, asset_destination_basename) end |
#defaults ⇒ Object
57 58 59 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 57 def defaults {} end |
#destination(site_destination_dir) ⇒ Object
17 18 19 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 17 def destination(site_destination_dir) File.join(site_destination_dir, asset_destination_path) end |
#destination_rel_dir ⇒ Object
37 38 39 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 37 def destination_rel_dir asset_destination_dir end |
#modified? ⇒ Boolean
33 34 35 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 33 def modified? stamped_at != mtime end |
#modified_time ⇒ Object
25 26 27 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 25 def modified_time File.stat(path).mtime end |
#mtime ⇒ Object
29 30 31 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 29 def mtime modified_time.to_i end |
#path ⇒ Object
Conformance to remaining Jekyll StaticFile public API methods
9 10 11 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 9 def path asset_source_path end |
#placeholders ⇒ Object
61 62 63 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 61 def placeholders {} end |
#relative_path ⇒ Object
13 14 15 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 13 def relative_path path.sub(/\A#{@site.source}/, '') end |
#to_liquid ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 41 def to_liquid { 'path' => relative_path, 'modified_time' => modified_time, 'extname' => extname } end |
#type ⇒ Object
53 54 55 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 53 def type nil # no collection present end |
#url ⇒ Object
21 22 23 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 21 def url asset_destination_path end |
#write? ⇒ Boolean
49 50 51 |
# File 'lib/jekyll/minibundle/asset_file_properties.rb', line 49 def write? true end |