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.



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

def initialize(project)
  @project = project
end

Class Attribute Details

.languagesObject

Returns the value of attribute languages.



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

def languages
  @languages
end

.runner_nameObject

Returns the value of attribute runner_name.



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

def runner_name
  @runner_name
end

Instance Attribute Details

#projectObject (readonly)

Returns the value of attribute project.



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

def project
  @project
end

Class Method Details

.specify(options) ⇒ Object



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

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

.to_symObject



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

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

Instance Method Details

#build?Boolean

Returns:

  • (Boolean)


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

def build?
  true
end

#launchObject



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

def launch
  fail 'Not implemented'
end