Sha256: a3032976b716123efc5b7c7dd6a67bd173daa68135b6f9aef38c1628cd2e9099

Contents?: true

Size: 311 Bytes

Versions: 21

Compression:

Stored size: 311 Bytes

Contents

require 'rubrowser/parser/file'
require 'rubrowser/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

21 entries across 21 versions & 1 rubygems

Version Path
rubrowser-2.11 lib/rubrowser/parser/factory.rb
rubrowser-2.10 lib/rubrowser/parser/factory.rb
rubrowser-2.9.1 lib/rubrowser/parser/factory.rb
rubrowser-2.9.0 lib/rubrowser/parser/factory.rb
rubrowser-2.8.0 lib/rubrowser/parser/factory.rb
rubrowser-2.7.1 lib/rubrowser/parser/factory.rb
rubrowser-2.7.0 lib/rubrowser/parser/factory.rb
rubrowser-2.6.0 lib/rubrowser/parser/factory.rb
rubrowser-2.5.0 lib/rubrowser/parser/factory.rb
rubrowser-2.4.0 lib/rubrowser/parser/factory.rb
rubrowser-2.3.0 lib/rubrowser/parser/factory.rb
rubrowser-2.2.0 lib/rubrowser/parser/factory.rb
rubrowser-2.1.0 lib/rubrowser/parser/factory.rb
rubrowser-2.0.0 lib/rubrowser/parser/factory.rb
rubrowser-0.3.1 lib/rubrowser/parser/factory.rb
rubrowser-0.3.0 lib/rubrowser/parser/factory.rb
rubrowser-0.2.7 lib/rubrowser/parser/factory.rb
rubrowser-0.2.6 lib/rubrowser/parser/factory.rb
rubrowser-0.2.5 lib/rubrowser/parser/factory.rb
rubrowser-0.2.4 lib/rubrowser/parser/factory.rb