Module: Waves::Resources::FileMixin

Defined in:
lib/waves/resources/file_mixin.rb

Instance Method Summary collapse

Instance Method Details

#load_from_file(path) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/waves/resources/file_mixin.rb', line 3

def load_from_file( path )
  if File.exist?( path )
    http_cache( File.mtime( path ) ) {
      File.read( path )
    }
  end
end