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