Skip to content

Commit

Permalink
Add Reader options.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Jan 5, 2016
1 parent ee477d8 commit 50c00e6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions lib/rdf/tabular/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ class Reader < RDF::Reader
# @return [:read]
attr_reader :input

##
# Writer options
# @see http://www.rubydoc.info/github/ruby-rdf/rdf/RDF/Writer#options-class_method
def self.options
super + [
RDF::CLI::Option.new(
symbol: :metadata,
datatype: RDF::URI,
on: ["--metadata URI"],
description: "user supplied metadata, merged on top of extracted metadata. If provided as a URL, Metadata is loade from that location.") {|arg| RDF::URI(arg)},
RDF::CLI::Option.new(
symbol: :minimal,
datatype: TrueClass,
on: ["--minimal"],
description: "Includes only the information gleaned from the cells of the tabular data.") {true},
RDF::CLI::Option.new(
symbol: :noProv,
datatype: TrueClass,
on: ["--no-prov"],
description: "do not output optional provenance information.") {true},
]
end

##
# Initializes the RDF::Tabular Reader instance.
#
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
require 'suite_helper'
require 'simplecov'
require 'coveralls'
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
]
])
SimpleCov.start do
add_filter "/spec/"
end
Expand Down

0 comments on commit 50c00e6

Please sign in to comment.