Class: GEPUB::ResourceBuilder::ResourceItem
- Inherits:
-
Object
- Object
- GEPUB::ResourceBuilder::ResourceItem
- Defined in:
- lib/gepub/resource_builder.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
Instance Method Summary collapse
- #apply_one_to_multi ⇒ Object
-
#initialize(item) ⇒ ResourceItem
constructor
A new instance of ResourceItem.
- #media_type(val) ⇒ Object
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(item) ⇒ ResourceItem
Returns a new instance of 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
#item ⇒ Object (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_multi ⇒ Object
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 |