Sha256: ceb9cc3db09d4af084b4830e3737156078238193857b38a9620a2d5bed207eb4

Contents?: true

Size: 989 Bytes

Versions: 14

Compression:

Stored size: 989 Bytes

Contents

module Aws
  module Cfn
    module Dsl
      module Output

        def write(*s)
          if s.is_a?(Array)
            s = s.join('')
          end
          if @output.size > 0
            @output[0].write s
          else
            print s
          end
        end

        def writeln(s='')
          if @output.size > 0
            @output[0].puts s
          else
            puts s
          end
        end

        def open_output(subdir,name)
          if @config[:directory]
            file = rb_file(subdir, name)
            if i_am_maintainer(file)
              @output.unshift File.open(file, 'w')
              true
            else
              false
            end
          else
            true
          end
        end

        def close_output()
          if @config[:directory] and @output.size > 0
            fp = @output.shift
            fp.close
          end
        end

        def self.included(includer)

        end

      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
aws-cfn-dsl-0.9.7 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.9.6 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.9.5 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.9.4 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.9.3 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.9.2 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.9.1 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.8.5 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.8.4 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.8.3 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.8.2 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.8.1 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.8.0 lib/aws/cfn/dsl/mixins/output.rb
aws-cfn-dsl-0.7.0 lib/aws/cfn/dsl/mixins/output.rb