Method: Effective::CodeReader#initialize
- Defined in:
- app/models/effective/code_reader.rb
#initialize(filename, &block) ⇒ CodeReader
Returns a new instance of CodeReader.
5 6 7 8 |
# File 'app/models/effective/code_reader.rb', line 5 def initialize(filename, &block) @lines = File.open(filename).readlines block.call(self) if block_given? end |