class J2119::RoleConstraints
Just a hash to remember constraints
Public Class Methods
new()
click to toggle source
# File lib/j2119/role_constraints.rb, line 18 def initialize @constraints = {} end
Public Instance Methods
add(role, constraint)
click to toggle source
# File lib/j2119/role_constraints.rb, line 22 def add(role, constraint) @constraints[role] ||= [] @constraints[role] << constraint end
get_constraints(role)
click to toggle source
# File lib/j2119/role_constraints.rb, line 27 def get_constraints(role) @constraints[role] || [] end