Module: Summon::Refworks

Included in:
Document
Defined in:
lib/summon/refworks.rb,
lib/summon/refworks/version.rb

Defined Under Namespace

Modules: Builder

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#to_refworks(options = {}) ⇒ Object



6
7
8
# File 'lib/summon/refworks.rb', line 6

def to_refworks(options = {})
  Builder.build self, options
end

#to_refworks_text(options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/summon/refworks.rb', line 10

def to_refworks_text(options = {})
  buffer = StringIO.new
  to_refworks(options).each do |key, values|
    values.each do |value|
      buffer.puts "#{key} #{value}"
    end
  end
  buffer.string
end