Sha256: 95f454f664e02a8be3490e0cfd87cbc4e3c5c4f04ff7a8346a959f4e98381dd7

Contents?: true

Size: 407 Bytes

Versions: 13

Compression:

Stored size: 407 Bytes

Contents

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

    def result
      if @data.is_a?(Kubes::Compiler::Dsl::Core::Blocks)
        @data.results.each { |k,v| process(v) } # returns nil
      else
        process(@data) # returns Hash
      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.3.5 lib/kubes/compiler/decorator/base.rb
kubes-0.3.4 lib/kubes/compiler/decorator/base.rb
kubes-0.3.3 lib/kubes/compiler/decorator/base.rb
kubes-0.3.2 lib/kubes/compiler/decorator/base.rb
kubes-0.3.1 lib/kubes/compiler/decorator/base.rb
kubes-0.3.0 lib/kubes/compiler/decorator/base.rb
kubes-0.2.6 lib/kubes/compiler/decorator/base.rb
kubes-0.2.5 lib/kubes/compiler/decorator/base.rb
kubes-0.2.4 lib/kubes/compiler/decorator/base.rb
kubes-0.2.3 lib/kubes/compiler/decorator/base.rb
kubes-0.2.2 lib/kubes/compiler/decorator/base.rb
kubes-0.2.1 lib/kubes/compiler/decorator/base.rb
kubes-0.2.0 lib/kubes/compiler/decorator/base.rb