Class: Buildr::Run::Base

Inherits:
Object show all
Defined in:
lib/buildr/run.rb

Overview

Base class for any run provider. Defines most common functionality (things like @lang@, @build?@ and friends).

Direct Known Subclasses

JavaRunner

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Base

Returns a new instance of Base.



57
58
59
# File 'lib/buildr/run.rb', line 57

def initialize(project)
  @project = project
end

Class Attribute Details

.languagesObject

Returns the value of attribute languages.



45
46
47
# File 'lib/buildr/run.rb', line 45

def languages
  @languages
end

.runner_nameObject

Returns the value of attribute runner_name.



45
46
47
# File 'lib/buildr/run.rb', line 45

def runner_name
  @runner_name
end

Instance Attribute Details

#projectObject (readonly)

Returns the value of attribute project.



42
43
44
# File 'lib/buildr/run.rb', line 42

def project
  @project
end

Class Method Details

.specify(options) ⇒ Object



47
48
49
50
# File 'lib/buildr/run.rb', line 47

def specify(options)
  @runner_name ||= options[:name]
  @languages ||= options[:languages]
end

.to_symObject



52
53
54
# File 'lib/buildr/run.rb', line 52

def to_sym
  @runner_name || name.split('::').last.downcase.to_sym
end

Instance Method Details

#build?Boolean

Returns:

  • (Boolean)


61
62
63
# File 'lib/buildr/run.rb', line 61

def build?
  true
end

#launchObject



65
66
67
# File 'lib/buildr/run.rb', line 65

def launch
  fail 'Not implemented'
end