Sha256: d9238c4a2b50fa4fb29c18aa0ed2c4123903a31dacdff65d309226de6a749ab3

Contents?: true

Size: 317 Bytes

Versions: 9

Compression:

Stored size: 317 Bytes

Contents

module Runbook
  module DSL
    def self.class(*modules)
      Class.new do
        attr_reader :parent

        def initialize(parent)
          @parent = parent
        end

        modules.each do |mod|
          prepend mod
        end
      end
    end

    def self.dsl_ivars
      [:@parent]
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
careacademy-runbook-1.2.0 lib/runbook/dsl.rb
runbook-1.1.0 lib/runbook/dsl.rb
runbook-1.0.0 lib/runbook/dsl.rb
runbook-0.16.1 lib/runbook/dsl.rb
runbook-0.16.0 lib/runbook/dsl.rb
runbook-0.15.0 lib/runbook/dsl.rb
runbook-0.14.0 lib/runbook/dsl.rb
runbook-0.13.0 lib/runbook/dsl.rb
runbook-0.12.1 lib/runbook/dsl.rb