Module: RDF::Raptor::CLI

Defined in:
lib/rdf/raptor/cli.rb

Overview

A command-line interface to Raptor’s rapper utility.

Defined Under Namespace

Classes: Reader, Writer

Constant Summary collapse

ENGINE =
:cli

Instance Method Summary collapse

Instance Method Details

#versionString

Returns the installed rapper version number, or nil if rapper is not available.

Examples:

RDF::Raptor.version  #=> "1.4.21"

Returns:

  • (String)


17
18
19
20
21
# File 'lib/rdf/raptor/cli.rb', line 17

def version
  if `#{RAPPER} --version 2>/dev/null` =~ /^(\d+)\.(\d+)\.(\d+)/
    [$1, $2, $3].join('.')
  end
end