Class: GEPUB::Bindings::MediaType

Inherits:
Object
  • Object
show all
Defined in:
lib/gepub/bindings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#handlerObject

Returns the value of attribute handler.



9
10
11
# File 'lib/gepub/bindings.rb', line 9

def handler
  @handler
end

#media_typeObject

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