Class: Relaton::Plateau::Cover
- Inherits:
-
Object
- Object
- Relaton::Plateau::Cover
- Defined in:
- lib/relaton/plateau/cover.rb
Instance Attribute Summary collapse
- #image ⇒ RelatonBib::Image readonly
Instance Method Summary collapse
-
#initialize(image) ⇒ Cover
constructor
Initialize the Cover object.
- #to_asciibib(prefix = "") ⇒ Object
- #to_hash ⇒ Object
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(image) ⇒ Cover
Initialize the Cover object
12 13 14 |
# File 'lib/relaton/plateau/cover.rb', line 12 def initialize(image) @image = image end |
Instance Attribute Details
#image ⇒ RelatonBib::Image (readonly)
5 6 7 |
# File 'lib/relaton/plateau/cover.rb', line 5 def image @image end |
Instance Method Details
#to_asciibib(prefix = "") ⇒ Object
26 27 28 29 |
# File 'lib/relaton/plateau/cover.rb', line 26 def to_asciibib(prefix = "") pref = prefix.empty? ? "cover" : "#{prefix}.cover" image.to_asciibib pref end |
#to_hash ⇒ Object
22 23 24 |
# File 'lib/relaton/plateau/cover.rb', line 22 def to_hash image.to_hash end |
#to_xml(builder) ⇒ Object
16 17 18 19 20 |
# File 'lib/relaton/plateau/cover.rb', line 16 def to_xml(builder) builder.cover do |b| image.to_xml b end end |