Class: Jekyll::Minibundle::DevelopmentFile
- Inherits:
-
Object
- Object
- Jekyll::Minibundle::DevelopmentFile
- Includes:
- AssetFileOperations, AssetFileProperties
- Defined in:
- lib/jekyll/minibundle/development_file.rb
Instance Attribute Summary collapse
-
#asset_destination_dir ⇒ Object
readonly
Returns the value of attribute asset_destination_dir.
-
#asset_destination_filename ⇒ Object
readonly
Returns the value of attribute asset_destination_filename.
-
#asset_source_path ⇒ Object
readonly
Returns the value of attribute asset_source_path.
-
#stamped_at ⇒ Object
readonly
Returns the value of attribute stamped_at.
Instance Method Summary collapse
- #extname ⇒ Object
-
#initialize(site, asset_source_path, asset_destination_path) ⇒ DevelopmentFile
constructor
A new instance of DevelopmentFile.
- #write(site_destination_dir) ⇒ Object
Methods included from AssetFileProperties
#asset_destination_path, #defaults, #destination, #destination_rel_dir, #modified?, #modified_time, #mtime, #name, #path, #placeholders, #relative_path, #to_liquid, #type, #url, #write?
Methods included from AssetFileOperations
Constructor Details
#initialize(site, asset_source_path, asset_destination_path) ⇒ DevelopmentFile
Returns a new instance of DevelopmentFile.
11 12 13 14 15 16 17 |
# File 'lib/jekyll/minibundle/development_file.rb', line 11 def initialize(site, asset_source_path, asset_destination_path) @site = site @asset_source_path = asset_source_path @asset_destination_dir = File.dirname(asset_destination_path) @asset_destination_filename = File.basename(asset_destination_path) @stamped_at = nil end |
Instance Attribute Details
#asset_destination_dir ⇒ Object (readonly)
Returns the value of attribute asset_destination_dir.
9 10 11 |
# File 'lib/jekyll/minibundle/development_file.rb', line 9 def asset_destination_dir @asset_destination_dir end |
#asset_destination_filename ⇒ Object (readonly)
Returns the value of attribute asset_destination_filename.
9 10 11 |
# File 'lib/jekyll/minibundle/development_file.rb', line 9 def asset_destination_filename @asset_destination_filename end |
#asset_source_path ⇒ Object (readonly)
Returns the value of attribute asset_source_path.
9 10 11 |
# File 'lib/jekyll/minibundle/development_file.rb', line 9 def asset_source_path @asset_source_path end |
#stamped_at ⇒ Object (readonly)
Returns the value of attribute stamped_at.
9 10 11 |
# File 'lib/jekyll/minibundle/development_file.rb', line 9 def stamped_at @stamped_at end |
Instance Method Details
#extname ⇒ Object
21 22 23 |
# File 'lib/jekyll/minibundle/development_file.rb', line 21 def extname File.extname(asset_destination_filename) end |
#write(site_destination_dir) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/jekyll/minibundle/development_file.rb', line 25 def write(site_destination_dir) if modified? @stamped_at = mtime write_destination(site_destination_dir) true else false end end |