Module: BentoSearch::OnlyPremadeOpenurl

Defined in:
app/item_decorators/bento_search/only_premade_openurl.rb

Overview

A Decorator that will make #to_openurl refuse to construct an openurl from individual elements, it’ll use the #openurl_kev_co or nothing.

Instance Method Summary collapse

Instance Method Details

#to_openurlObject



12
13
14
15
16
17
18
# File 'app/item_decorators/bento_search/only_premade_openurl.rb', line 12

def to_openurl
  if self.openurl_kev_co
    return OpenURL::ContextObject.new_from_kev( self.openurl_kev_co )
  else
    return nil
  end
end