Module: Hyrax::Zotero

Defined in:
lib/hyrax/zotero.rb,
lib/hyrax/zotero/config.rb

Class Method Summary collapse

Class Method Details

.configObject


4
5
6
# File 'lib/hyrax/zotero/config.rb', line 4

def self.config
  @config ||= reload_config!
end

.publications_url(zotero_userid) ⇒ Object


12
13
14
# File 'lib/hyrax/zotero/config.rb', line 12

def self.publications_url(zotero_userid)
  "/users/#{zotero_userid}/publications/items"
end

.reload_config!Object


8
9
10
# File 'lib/hyrax/zotero/config.rb', line 8

def self.reload_config!
  @config = YAML.safe_load(ERB.new(IO.read(Rails.root.join('config', 'zotero.yml'))).result)['zotero']
end