Class: Txbr::Uploader
- Inherits:
-
Object
- Object
- Txbr::Uploader
- Defined in:
- lib/txbr/uploader.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
-
#initialize(project) ⇒ Uploader
constructor
A new instance of Uploader.
- #upload_all ⇒ Object
- #upload_item(item) ⇒ Object
Constructor Details
#initialize(project) ⇒ Uploader
5 6 7 |
# File 'lib/txbr/uploader.rb', line 5 def initialize(project) @project = project end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
3 4 5 |
# File 'lib/txbr/uploader.rb', line 3 def project @project end |
Instance Method Details
#upload_all ⇒ Object
9 10 11 12 13 |
# File 'lib/txbr/uploader.rb', line 9 def upload_all project.handler.each_item do |item| upload_item(item) end end |
#upload_item(item) ⇒ Object
15 16 17 18 19 |
# File 'lib/txbr/uploader.rb', line 15 def upload_item(item) item.each_resource do |resource| upload_resource(resource) end end |