Module: RestfulAcl::Model::ClassMethods

Defined in:
lib/restful_acl/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#momObject

Returns the value of attribute mom.



10
11
12
# File 'lib/restful_acl/model.rb', line 10

def mom
  @mom
end

#singletonObject

Returns the value of attribute singleton.



10
11
12
# File 'lib/restful_acl/model.rb', line 10

def singleton
  @singleton
end

Instance Method Details

#has_parent?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/restful_acl/model.rb', line 19

def has_parent?
  @mom.present?
end

#is_singleton?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/restful_acl/model.rb', line 23

def is_singleton?
  @singleton.present?
end

#logical_parent(model, *options) ⇒ Object



12
13
14
15
16
17
# File 'lib/restful_acl/model.rb', line 12

def logical_parent(model, *options)
  @mom = model
  @singleton = options.include?(:singleton)

  include InstanceMethods
end