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.



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

def initialize(handler, media_type)
  @handler = handler
  @media_type = media_type
end

Instance Attribute Details

#handlerObject

Returns the value of attribute handler.



7
8
9
# File 'lib/gepub/bindings.rb', line 7

def handler
  @handler
end

#media_typeObject

Returns the value of attribute media_type.



7
8
9
# File 'lib/gepub/bindings.rb', line 7

def media_type
  @media_type
end

Instance Method Details

#to_xml(builder) ⇒ Object



12
13
14
# File 'lib/gepub/bindings.rb', line 12

def to_xml(builder)
  builder.mediaType({'handler' => @handler, 'media-type' => @media_type})
end