Module: Baltix::Actor::Spec

Defined in:
lib/baltix/actor/spec.rb

Class Method Summary collapse

Class Method Details

.apply_to(space, template = nil) ⇒ Object

apply_to generates spec according to the provided setup



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/baltix/actor/spec.rb', line 13

def apply_to space, template = nil
   spec = Baltix::Spec.find(space.spec_type)

   rendered = spec.render(space, template)

   if space.options.output_file
      File.open(space.options.output_file, "w") { |f| f.puts(rendered) }
   end

   rendered
end

.context_kindObject



7
8
9
# File 'lib/baltix/actor/spec.rb', line 7

def context_kind
   Baltix::Space
end