Class: Hawk::DSL

Inherits:
Object
  • Object
show all
Includes:
Builder::DSL, Notifier::DSL, S3Uploader::DSL
Defined in:
lib/hawk/dsl.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Notifier::DSL

#email_body, #email_subject, #user

Methods included from S3Uploader::DSL

#access_key_id, #bucket_name, #delete_after, #secret_access_key

Methods included from Builder::DSL

#bundle_id_fix, #configuration, #fullsize_image_path, #icon_path, #project, #scheme, #signing_identity, #vendor_name, #workspace

Constructor Details

#initialize(opts = {}) ⇒ DSL

Returns a new instance of DSL.



18
19
20
# File 'lib/hawk/dsl.rb', line 18

def initialize(opts = {})
  @options = opts
end

Class Method Details

.load(file, options) ⇒ Object



11
12
13
14
15
16
# File 'lib/hawk/dsl.rb', line 11

def self.load(file, options)
  instance = self.new(options)
  instance.instance_eval(File.read(file), file)

  instance.execute
end

Instance Method Details

#executeObject



22
23
24
25
26
27
28
# File 'lib/hawk/dsl.rb', line 22

def execute
  extend Hawk::Builder
  extend Hawk::S3Uploader
  extend Hawk::Notifier

  notify_users # notify_users will trigger all dependent actions
end