Class: AmazonStaticSite::Worker
- Inherits:
-
Object
- Object
- AmazonStaticSite::Worker
- Defined in:
- lib/amazon_static_site/worker.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(file:, folder:) ⇒ Worker
constructor
A new instance of Worker.
Constructor Details
#initialize(file:, folder:) ⇒ Worker
Returns a new instance of Worker.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/amazon_static_site/worker.rb', line 5 def initialize(file:, folder:) @config = Config.new(file: file, folder: folder) @service = Service.new(config) puts "Starting...".yellow puts " Config file: #{config.file}" puts " Folder to upload: #{config.folder}" puts "Connecting to Amazon:".yellow service.run_s3 puts "Uploading to Amazon:".yellow service.run_upload puts "Configure Cloudflare:".yellow service.run_cloudflare end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/amazon_static_site/worker.rb', line 3 def config @config end |
#service ⇒ Object (readonly)
Returns the value of attribute service.
3 4 5 |
# File 'lib/amazon_static_site/worker.rb', line 3 def service @service end |