Sha256: 4deb4c0a1a2dacd3edff6ba40733b4bfda070900253d36925ee3e3f321685d04

Contents?: true

Size: 669 Bytes

Versions: 1

Compression:

Stored size: 669 Bytes

Contents

require "stakeholder_management_strategy/version"
require 'active_support/all'

module StakeholderManagementStrategy
  @@LEVELS = [:no, :some, :high]

  def self.strategy(power:, interest:)
    raise unless [power, interest].all? {|dimension| dimension.in? @@LEVELS }

    case power
      when :high
        case interest
          when :no
            :watch
          when :some
            :keep_satisfied
          when :high
            :constant_active_management
        end
      when :some
        :keep_onside
      when :no
        case interest
          when :no
            :ignore
          else
            :keep_informed
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stakeholder_management_strategy-0.0.1 lib/stakeholder_management_strategy.rb