Class: GEPUB::ResourceBuilder::ResourceItem

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ ResourceItem


6
7
8
# File 'lib/gepub/resource_builder.rb', line 6

def initialize(item)
  @item = item
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object


18
19
20
# File 'lib/gepub/resource_builder.rb', line 18

def method_missing(name, *args, &block)
  @item.send(name.to_sym, *args, &block)
end

Instance Attribute Details

#itemObject (readonly)

Returns the value of attribute item


5
6
7
# File 'lib/gepub/resource_builder.rb', line 5

def item
  @item
end

Instance Method Details

#apply_one_to_multiObject


10
11
12
# File 'lib/gepub/resource_builder.rb', line 10

def apply_one_to_multi
  true
end

#media_type(val) ⇒ Object


14
15
16
# File 'lib/gepub/resource_builder.rb', line 14

def media_type(val)
  @item.set_media_type(val)
end