Sha256: 634b4a51795dc90f04823b97c1dceffb91290ff91307f1c5bef864de195a6bd3

Contents?: true

Size: 667 Bytes

Versions: 3

Compression:

Stored size: 667 Bytes

Contents

module Danger
  class Dangerfile
    module DSL
      class Plugin
        def initialize(dsl)
          @dsl = dsl
        end

        # Since we have a reference to the DSL containing all the information
        # We need to redirect the self calls to the DSL
        def method_missing(method_sym, *arguments, &_block)
          return @dsl.send(method_sym, *arguments) if @dsl.respond_to?(method_sym)
          return @dsl.method_missing(method_sym, *arguments)
        end

        def run
          raise "run method must be implemented"
        end

        def self.description
          "Add plugin description here"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danger-0.7.2 lib/danger/plugin.rb
danger-0.7.1 lib/danger/plugin.rb
danger-0.7.0 lib/danger/plugins/plugin.rb