Class: EPUB::Publication::Package::Bindings
- Inherits:
-
Object
- Object
- EPUB::Publication::Package::Bindings
- Includes:
- ContentModel
- Defined in:
- lib/epub/maker/publication.rb
Instance Method Summary collapse
- #make {|_self| ... } ⇒ Object
- #make_media_type {|media_type| ... } ⇒ Object
- #to_xml_fragment(xml) ⇒ Object
Methods included from ContentModel
Instance Method Details
#make {|_self| ... } ⇒ Object
359 360 361 362 |
# File 'lib/epub/maker/publication.rb', line 359 def make yield self if block_given? self end |
#make_media_type {|media_type| ... } ⇒ Object
364 365 366 367 368 369 |
# File 'lib/epub/maker/publication.rb', line 364 def make_media_type media_type = MediaType.new self << media_type yield media_type if block_given? media_type end |
#to_xml_fragment(xml) ⇒ Object
371 372 373 374 375 376 377 378 379 |
# File 'lib/epub/maker/publication.rb', line 371 def to_xml_fragment(xml) xml.bindings_ { media_types.each do |media_type| media_type_node = xml.mediaType to_xml_attribute media_type_node, media_type, [:media_type] media_type_node['handler'] = media_type.handler.id if media_type.handler && media_type.handler.id end } end |