Class: PostPolicy::DataSource::File

Inherits:
Base
  • Object
show all
Defined in:
lib/postpolicy/plugins/datasource/file.rb

Instance Method Summary collapse

Methods inherited from Base

#exists?

Constructor Details

#initialize(filename) ⇒ File

Returns a new instance of File.



6
7
8
9
# File 'lib/postpolicy/plugins/datasource/file.rb', line 6

def initialize( filename )
  @values = []
  ::File.open(filename).each_line { |line| @values << line.chomp }
end