Class: Fukuzatsu::FileReader::SourceFile

Inherits:
Object
  • Object
show all
Defined in:
lib/fukuzatsu/file_reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ SourceFile



29
30
31
# File 'lib/fukuzatsu/file_reader.rb', line 29

def initialize(filename)
  @filename = filename
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



27
28
29
# File 'lib/fukuzatsu/file_reader.rb', line 27

def filename
  @filename
end

Instance Method Details

#contentsObject



33
34
35
# File 'lib/fukuzatsu/file_reader.rb', line 33

def contents
  File.read(filename)
end