Class: CO2Equivalents::Citation
- Inherits:
-
Object
- Object
- CO2Equivalents::Citation
- Defined in:
- lib/co2_equivalents/citation.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, deets = {}) ⇒ Citation
constructor
A new instance of Citation.
Constructor Details
#initialize(url, deets = {}) ⇒ Citation
Returns a new instance of Citation.
5 6 7 8 9 10 |
# File 'lib/co2_equivalents/citation.rb', line 5 def initialize(url, deets = {}) self.url = url deets.each do |deet, value| self.send "#{deet}=", value end end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
3 4 5 |
# File 'lib/co2_equivalents/citation.rb', line 3 def @author end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/co2_equivalents/citation.rb', line 3 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/co2_equivalents/citation.rb', line 3 def url @url end |