Sha256: 6e1f4e6fd93e311cdf60961ad325d93db611c001194eafd547d28281d946ef41
Contents?: true
Size: 1.49 KB
Versions: 3
Compression:
Stored size: 1.49 KB
Contents
# Author:: <%= fullname %> <<%= email %>>. # Copyright:: Copyright (c) <%= year %> Uttk Team. All rights reserved. # License:: LGPL # Revision:: $Id: /w/fey/uttk/trunk/lib/uttk/generators/templates/strategy-command.rb 24395 2006-07-10T07:52:32.589929Z ertai $ module Uttk module Strategies class <%= class_name %> < Strategy include Concrete # # Methods # def prologue super @runner = mk_system_runner @command = 'a_command...'.to_ocmd # ... end protected :prologue def run_impl @my_data = @command.run @runner end protected :run_impl def assertion assert_cmd UM::StreamMatcher, @my_data, :output => ..., :error => ..., :exit => ... # ... pass end protected :assertion def abort_hook @runner.abort @my_data if @runner and defined? @my_data super end protected :abort_hook def epilogue @my_data.clean if defined? @my_data super end protected :epilogue # # Attributes # # Contains the OCmd::Datas::Data object, the result of the command running. attr_reader :my_data attribute :an_attribute, 'a description', THE_CLASS, DEFAULT_VALUE, :mandatory, :invisible end # class <%= class_name %> end # module Strategies end # module Uttk
Version data entries
3 entries across 3 versions & 1 rubygems