Class: GScholar::Citation

Inherits:
Object
  • Object
show all
Includes:
Citeable
Defined in:
lib/gscholar/citation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Citeable

#author, #citation, included, #title, #year

Constructor Details

#initialize(id) ⇒ Citation

Returns a new instance of Citation.



37
38
39
40
# File 'lib/gscholar/citation.rb', line 37

def initialize(id)
  @id = id
  @bibtex = Utils::LazyProxy.new { Utils.fetch(bibtex_url).body }
end

Instance Attribute Details

#bibtexObject (readonly) Also known as: to_s

Returns the value of attribute bibtex.



34
35
36
# File 'lib/gscholar/citation.rb', line 34

def bibtex
  @bibtex
end

#idObject (readonly)

Returns the value of attribute id.



34
35
36
# File 'lib/gscholar/citation.rb', line 34

def id
  @id
end