class Shamu::Features::Conditions::Roles

Match against the current user's roles.

Public Instance Methods

match?( context ) click to toggle source

(see Condition#match?)

# File lib/shamu/features/conditions/roles.rb, line 9
def match?( context )
  ( context.roles && roles ).any?
end

Private Instance Methods

roles() click to toggle source
# File lib/shamu/features/conditions/roles.rb, line 15
def roles
  @roles ||= Array( config )
end