Sha256: c870d3bc30243da413e989107338197e7ed5fdb494fcc4ebe300d3887873780b

Contents?: true

Size: 522 Bytes

Versions: 13

Compression:

Stored size: 522 Bytes

Contents

module Kubes::Compiler::Decorator
  class Base
    attr_reader :data
    def initialize(data)
      @data = data
    end

    def run
      return @data unless Kubes.config.suffix_hash
      process
    end

    def result
      if @data.key?(Kubes::Compiler::Dsl::Core::Blocks)
        @data.results.each { |k,v| process(v) } # returns nil
      else
        process # processes and returns @data
      end
      @data # important to return @data so we keep the original @data structure: Blocks or Hash
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kubes-0.7.3 lib/kubes/compiler/decorator/base.rb
kubes-0.7.2 lib/kubes/compiler/decorator/base.rb
kubes-0.7.1 lib/kubes/compiler/decorator/base.rb
kubes-0.7.0 lib/kubes/compiler/decorator/base.rb
kubes-0.6.8 lib/kubes/compiler/decorator/base.rb
kubes-0.6.7 lib/kubes/compiler/decorator/base.rb
kubes-0.6.6 lib/kubes/compiler/decorator/base.rb
kubes-0.6.5 lib/kubes/compiler/decorator/base.rb
kubes-0.6.4 lib/kubes/compiler/decorator/base.rb
kubes-0.6.3 lib/kubes/compiler/decorator/base.rb
kubes-0.6.2 lib/kubes/compiler/decorator/base.rb
kubes-0.6.1 lib/kubes/compiler/decorator/base.rb
kubes-0.6.0 lib/kubes/compiler/decorator/base.rb