Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/roles_mongoid/strategy/single.rb,
lib/generators/mongoid/roles/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#admin?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/roles_mongoid/strategy/single.rb', line 4

def admin?
  self == :admin
end

#as_filenameObject



8
9
10
# File 'lib/generators/mongoid/roles/core_ext.rb', line 8

def as_filename
  self.to_s.underscore  
end