Class: Coradoc::Document::Bibdata
- Inherits:
-
Object
- Object
- Coradoc::Document::Bibdata
- Defined in:
- lib/coradoc/document/bibdata.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(bibdata, options = {}) ⇒ Bibdata
constructor
A new instance of Bibdata.
- #to_hash ⇒ Object
Constructor Details
#initialize(bibdata, options = {}) ⇒ Bibdata
Returns a new instance of Bibdata.
6 7 8 9 |
# File 'lib/coradoc/document/bibdata.rb', line 6 def initialize(bibdata, = {}) @bibdata = bibdata @options = end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/coradoc/document/bibdata.rb', line 4 def data @data end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/coradoc/document/bibdata.rb', line 15 def to_hash Hash.new.tap do |hash| data.each do |attribute| hash[attribute.key.to_s] = attribute.value.to_s.gsub("'", "") end end end |