Sha256: c46767b396f066a783c756dc734a6d6270723cff23463bc238c7c2887fa49fa1

Contents?: true

Size: 502 Bytes

Versions: 19

Compression:

Stored size: 502 Bytes

Contents

class Kubes::Compiler::Strategy
  class Result
    include Kubes::Compiler::Util::YamlDump

    attr_reader :filename
    def initialize(filename, data)
      @filename, @data = filename, data
    end

    def io?
      @data.respond_to?(:read)
    end

    # decorate(:pre) or decorate(:post)
    def decorate!(phase)
      klass = "Kubes::Compiler::Decorator::#{phase.to_s.camelize}".constantize
      @data = klass.new(@data).result
    end

    def content
      yaml_dump(@data)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
kubes-0.6.8 lib/kubes/compiler/strategy/result.rb
kubes-0.6.7 lib/kubes/compiler/strategy/result.rb
kubes-0.6.6 lib/kubes/compiler/strategy/result.rb
kubes-0.6.5 lib/kubes/compiler/strategy/result.rb
kubes-0.6.4 lib/kubes/compiler/strategy/result.rb
kubes-0.6.3 lib/kubes/compiler/strategy/result.rb
kubes-0.6.2 lib/kubes/compiler/strategy/result.rb
kubes-0.6.1 lib/kubes/compiler/strategy/result.rb
kubes-0.6.0 lib/kubes/compiler/strategy/result.rb
kubes-0.5.1 lib/kubes/compiler/strategy/result.rb
kubes-0.5.0 lib/kubes/compiler/strategy/result.rb
kubes-0.4.7 lib/kubes/compiler/strategy/result.rb
kubes-0.4.6 lib/kubes/compiler/strategy/result.rb
kubes-0.4.5 lib/kubes/compiler/strategy/result.rb
kubes-0.4.4 lib/kubes/compiler/strategy/result.rb
kubes-0.4.3 lib/kubes/compiler/strategy/result.rb
kubes-0.4.2 lib/kubes/compiler/strategy/result.rb
kubes-0.4.1 lib/kubes/compiler/strategy/result.rb
kubes-0.4.0 lib/kubes/compiler/strategy/result.rb