Class: ZombieScout::RubySource
- Inherits:
-
Object
- Object
- ZombieScout::RubySource
- Defined in:
- lib/zombie_scout/ruby_source.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(filename) ⇒ RubySource
constructor
A new instance of RubySource.
- #source ⇒ Object
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
#path ⇒ Object (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
#source ⇒ Object
9 10 11 |
# File 'lib/zombie_scout/ruby_source.rb', line 9 def source @source ||= File.read(path) end |