module Diffend::Enabled

Verify if the plugin is enabled

Public Class Methods

call() click to toggle source

Checks if plugin is enabled

@return [Boolean] true if enabled, false otherwise

# 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