Class: ZombieScout::RubySource

Inherits:
Object
  • Object
show all
Defined in:
lib/zombie_scout/ruby_source.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ RubySource

Returns a new instance of RubySource.



3
4
5
# File 'lib/zombie_scout/ruby_source.rb', line 3

def initialize(filename)
  @path = filename
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/zombie_scout/ruby_source.rb', line 7

def path
  @path
end

Instance Method Details

#sourceObject



9
10
11
# File 'lib/zombie_scout/ruby_source.rb', line 9

def source
  @source ||= File.read(path)
end