class Mudguard::Domain::Dependency

A Dependency between Modules

Attributes

dependency[R]
location[R]

Public Class Methods

new(dependency:, location: nil) click to toggle source
# File lib/mudguard/domain/dependency.rb, line 9
def initialize(dependency:, location: nil)
  @location = location
  @dependency = dependency
end

Public Instance Methods

==(other) click to toggle source
# File lib/mudguard/domain/dependency.rb, line 22
def ==(other)
  @location == other.instance_eval { @location } &&
    @dependency == other.instance_eval { @dependency }
end
inspect() click to toggle source
# File lib/mudguard/domain/dependency.rb, line 14
def inspect
  "{#{@location}, #{@dependency}}"
end
match(policy) click to toggle source
# File lib/mudguard/domain/dependency.rb, line 18
def match(policy)
  @dependency.match(policy)
end