Class: Txbr::Uploader

Inherits:
Object
  • Object
show all
Defined in:
lib/txbr/uploader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Uploader



5
6
7
# File 'lib/txbr/uploader.rb', line 5

def initialize(project)
  @project = project
end

Instance Attribute Details

#projectObject (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_allObject



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