Method: Determinator::Retrieve::File#initialize

Defined in:
lib/determinator/retrieve/file.rb

#initialize(root:, serializer: Determinator::Serializers::JSON) ⇒ File

Returns a new instance of File.

Parameters:

  • :root (String, Pathname)

    The path to be used as the root to look in

  • :serializer (#load)

    A serializer which will take the string of the read file and return a Feature object.



9
10
11
12
# File 'lib/determinator/retrieve/file.rb', line 9

def initialize(root:, serializer: Determinator::Serializers::JSON )
  @root = Pathname.new(root)
  @serializer = serializer
end