Sha256: 01aafc99e03f3d3cefd7389577d9f3a3f3d661763d29fe4d99f2c2bb5c2cd7b3

Contents?: true

Size: 291 Bytes

Versions: 10

Compression:

Stored size: 291 Bytes

Contents

require 'parser/file'
require 'parser/directory'

module Rubrowser
  module Parser
    class Factory
      def self.build(file)
        if ::File.file?(file)
          File.new(file)
        elsif ::File.directory?(file)
          Directory.new(file)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubrowser-0.2.2 lib/parser/factory.rb
rubrowser-0.2.1 lib/parser/factory.rb
rubrowser-0.2.0 lib/parser/factory.rb
rubrowser-0.1.6 lib/parser/factory.rb
rubrowser-0.1.5 lib/parser/factory.rb
rubrowser-0.1.4 lib/parser/factory.rb
rubrowser-0.1.3 lib/parser/factory.rb
rubrowser-0.1.2 lib/parser/factory.rb
rubrowser-0.1.1 lib/parser/factory.rb
rubrowser-0.1.0 lib/parser/factory.rb