Sha256: 5810aac1f5352933dfcffa42d769b50734090e08c5bdffece0388cb0cb8d6224

Contents?: true

Size: 643 Bytes

Versions: 13

Compression:

Stored size: 643 Bytes

Contents

module RDF
  module Raptor
    ##
    # RDF::Raptor::Format mixin.
    module Format
      ##
      # @overload rapper_format
      #
      # @overload rapper_format(format)
      #   @param  [Symbol] format
      #
      # @return [void]
      def rapper_format(format = nil)
        unless format
          @rapper_format
        else
          @rapper_format = format
        end
      end
      
      def detect(sample)
        parser_name = RDF::Raptor::FFI::V2.raptor_world_guess_parser_name(RDF::Raptor::FFI::V2.world, nil, nil, sample, sample.length, nil)
        parser_name == rapper_format.to_s
      end
    end # Format
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rdf-raptor-3.2.0 lib/rdf/raptor/format.rb
rdf-raptor-3.1.0 lib/rdf/raptor/format.rb
rdf-raptor-2.2.0 lib/rdf/raptor/format.rb
rdf-raptor-2.0.0 lib/rdf/raptor/format.rb
rdf-raptor-1.99.0 lib/rdf/raptor/format.rb
rdf-raptor-1.2.1 lib/rdf/raptor/format.rb
rdf-raptor-1.2.0 lib/rdf/raptor/format.rb
rdf-raptor-1.1.2 lib/rdf/raptor/format.rb
rdf-raptor-1.1.1 lib/rdf/raptor/format.rb
rdf-raptor-1.1.0 lib/rdf/raptor/format.rb
rdf-raptor-1.0.1 lib/rdf/raptor/format.rb
rdf-raptor-1.0.0 lib/rdf/raptor/format.rb
rdf-raptor-1.0.0.beta1 lib/rdf/raptor/format.rb