Module: Hyrax::Zotero

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

Class Method Summary collapse

Class Method Details

.configObject



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

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

.publications_url(zotero_userid) ⇒ Object



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

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

.reload_config!Object



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

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