Module: Diffend::Enabled

Defined in:
lib/diffend/enabled.rb

Overview

Verify if the plugin is enabled

Class Method Summary collapse

Class Method Details

.callBoolean

Checks if plugin is enabled

Returns:

  • (Boolean)

    true if enabled, false otherwise



10
11
12
13
14
15
16
17
18
19
# File 'lib/diffend/enabled.rb', line 10

def call
  ::Bundler
    .default_gemfile
    .read
    .split("\n")
    .reject(&:empty?)
    .map(&:strip)
    .select { |line| line.start_with?('plugin') }
    .any? { |line| line.include?('diffend') }
end