Class: GEPUB::Bindings::MediaType
- Inherits:
-
Object
- Object
- GEPUB::Bindings::MediaType
- Defined in:
- lib/gepub/bindings.rb
Instance Attribute Summary collapse
-
#handler ⇒ Object
Returns the value of attribute handler.
-
#media_type ⇒ Object
Returns the value of attribute media_type.
Instance Method Summary collapse
-
#initialize(handler, media_type) ⇒ MediaType
constructor
A new instance of MediaType.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(handler, media_type) ⇒ MediaType
Returns a new instance of MediaType.
10 11 12 13 |
# File 'lib/gepub/bindings.rb', line 10 def initialize(handler, media_type) @handler = handler @media_type = media_type end |
Instance Attribute Details
#handler ⇒ Object
Returns the value of attribute handler.
9 10 11 |
# File 'lib/gepub/bindings.rb', line 9 def handler @handler end |
#media_type ⇒ Object
Returns the value of attribute media_type.
9 10 11 |
# File 'lib/gepub/bindings.rb', line 9 def media_type @media_type end |
Instance Method Details
#to_xml(builder) ⇒ Object
14 15 16 |
# File 'lib/gepub/bindings.rb', line 14 def to_xml(builder) builder.mediaType({'handler' => @handler, 'media-type' => @media_type}) end |