Class: SampleFile::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/sample_file/base.rb

Direct Known Subclasses

Image, Video

Instance Method Summary collapse

Instance Method Details

#file(type = nil) ⇒ Object



3
4
5
# File 'lib/sample_file/base.rb', line 3

def file(type=nil)
  File.open file_path(type)
end

#file_path(type = nil) ⇒ Object

Raises:

  • (NotImplementedError)


7
8
9
# File 'lib/sample_file/base.rb', line 7

def file_path(type=nil)
  raise NotImplementedError, "#{self.class} does not implement the file_path method"
end