Class: Target
- Inherits:
-
Object
- Object
- Target
- Defined in:
- lib/reggae.rb
Overview
A build target
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#implicits ⇒ Object
readonly
Returns the value of attribute implicits.
-
#outputs ⇒ Object
readonly
Returns the value of attribute outputs.
Instance Method Summary collapse
-
#initialize(outputs, command = '', dependencies = [], implicits = []) ⇒ Target
constructor
A new instance of Target.
- #jsonify ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(outputs, command = '', dependencies = [], implicits = []) ⇒ Target
Returns a new instance of Target.
34 35 36 37 38 39 |
# File 'lib/reggae.rb', line 34 def initialize(outputs, command = '', dependencies = [], implicits = []) @outputs = arrayify(outputs) @command = jsonifiable(command, ShellCommand) @dependencies = dependify(dependencies, FixedDependencies) @implicits = dependify(implicits, FixedDependencies) end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
32 33 34 |
# File 'lib/reggae.rb', line 32 def command @command end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
32 33 34 |
# File 'lib/reggae.rb', line 32 def dependencies @dependencies end |
#implicits ⇒ Object (readonly)
Returns the value of attribute implicits.
32 33 34 |
# File 'lib/reggae.rb', line 32 def implicits @implicits end |
#outputs ⇒ Object (readonly)
Returns the value of attribute outputs.
32 33 34 |
# File 'lib/reggae.rb', line 32 def outputs @outputs end |
Instance Method Details
#jsonify ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/reggae.rb', line 45 def jsonify { type: 'fixed', command: @command.jsonify, outputs: @outputs, dependencies: @dependencies.jsonify, implicits: @implicits.jsonify } end |
#to_json ⇒ Object
41 42 43 |
# File 'lib/reggae.rb', line 41 def to_json jsonify.to_json end |