Class: Blazing::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/blazing/dsl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ DSL

Returns a new instance of DSL.



7
8
9
# File 'lib/blazing/dsl.rb', line 7

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



5
6
7
# File 'lib/blazing/dsl.rb', line 5

def config
  @config
end

Instance Method Details

#env_script(path) ⇒ Object



21
22
23
# File 'lib/blazing/dsl.rb', line 21

def env_script(path)
  config.env_script = path
end

#rake(task_name) ⇒ Object



17
18
19
# File 'lib/blazing/dsl.rb', line 17

def rake(task_name)
  config.rake_task = task_name
end

#recipes(_args) ⇒ Object



33
34
35
# File 'lib/blazing/dsl.rb', line 33

def recipes(_args)
  warn 'recipes have been removed from blazing!'
end

#rvm(_args) ⇒ Object



29
30
31
# File 'lib/blazing/dsl.rb', line 29

def rvm(_args)
  warn 'you can not set the rvm ruby with the blazing DSL anymore. Use rake tasks!'
end

#rvm_scripts(_args) ⇒ Object



25
26
27
# File 'lib/blazing/dsl.rb', line 25

def rvm_scripts(_args)
  warn 'rvm_scripts in config has been deprecated and no longer works. Use env_script!'
end

#target(name, location, options = {}) ⇒ Object



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

def target(name, location, options = {})
  raise 'Name already taken' if config.targets.find { |t| t.name == name }

  config.targets << Blazing::Target.new(name, location, config, options)
end