Sha256: 7f926633c1e54b88aab1345c336446f52b493e8ae024d9bff72a30e81505a839

Contents?: true

Size: 829 Bytes

Versions: 6

Compression:

Stored size: 829 Bytes

Contents

# Author::    Nicolas Despres  <nicolas.despres@gmail.com>.
# Copyright:: Copyright (c) 2004, 2005 Uttk team. All rights reserved.
# License::   LGPL
# $Id: /w/fey/uttk/trunk/lib/uttk/strategies/Stub.rb 22102 2006-02-21T23:03:39.538964Z pouillar  $


module Uttk

  module Strategies

    # I repeat to the log the hash of value given to my attribute
    # _"returned_value"_
    class Stub < Strategy
      include Concrete

      protected
      def run_impl
        @returned_value.each { |k, v| @log[k] = v }
      end

      protected
      def assertion
        pass
      end

      attribute :returned_value, 'attribute which are going to be copied',
                                 :mandatory,
                                 :invisible do {} end

    end # class Stub

  end # module Strategies

end # module Uttk



Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
uttk-0.3.6.1 lib/uttk/strategies/Stub.rb
uttk-0.3.5.0 lib/uttk/strategies/Stub.rb
uttk-0.3.1.2 lib/uttk/strategies/Stub.rb
uttk-0.4.5.0 lib/uttk/strategies/Stub.rb
uttk-0.4.6.2 lib/uttk/strategies/Stub.rb
uttk-0.4.6.1 lib/uttk/strategies/Stub.rb