module Mudguard::Application
API to mudguard
Public Class Methods
check(project_path, notification)
click to toggle source
# File lib/mudguard/application/application.rb, line 11 def check(project_path, notification) create_policies(project_path) do |policies| policies.check(notification) end end
print_allowed_dependencies(project_path, notification)
click to toggle source
# File lib/mudguard/application/application.rb, line 17 def print_allowed_dependencies(project_path, notification) create_policies(project_path) do |policies| policies.print_allowed_dependencies(notification) end end
Private Class Methods
create_policies(project_path) { |policies| ... }
click to toggle source
# File lib/mudguard/application/application.rb, line 25 def create_policies(project_path) repo = Infrastructure::Persistence::ProjectRepository source_policies = repo.load_source_policies(project_path) policies = Domain::Policies.new(source_policies: source_policies) yield policies end