| Class | CorePlugins::ResourceManager::FileResource |
| In: |
lib/webgen/plugins/coreplugins/resourcemanager.rb
|
| Parent: | Resource |
Describes a file resource.
| res_path | [R] | The path to the file the resource references. |
# File lib/webgen/plugins/coreplugins/resourcemanager.rb, line 92
92: def initialize( name, output_path, res_path )
93: super( name, :file, output_path )
94: @res_path = res_path
95: end
# File lib/webgen/plugins/coreplugins/resourcemanager.rb, line 97
97: def data
98: File.read( @res_path )
99: end
# File lib/webgen/plugins/coreplugins/resourcemanager.rb, line 105
105: def write_resource( root_dir, file_handler )
106: FileUtils.cp( res_path, dest_path( root_dir ) ) if write_resource?( root_dir, file_handler )
107: end