Class: Specific::Command::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/specific/command/build.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(spec, type) ⇒ Build

Returns a new instance of Build.



6
7
8
9
10
# File 'lib/specific/command/build.rb', line 6

def initialize(spec, type)
  @spec = spec
  @type = type
  @renderer =  Renderer.for(@type)
end

Instance Attribute Details

#rendererObject (readonly)

Returns the value of attribute renderer.



4
5
6
# File 'lib/specific/command/build.rb', line 4

def renderer
  @renderer
end

#specObject (readonly)

Returns the value of attribute spec.



4
5
6
# File 'lib/specific/command/build.rb', line 4

def spec
  @spec
end

Instance Method Details

#runObject



12
13
14
# File 'lib/specific/command/build.rb', line 12

def run
  puts renderer.new(spec).render
end