Class: Lockdown::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/lockdown/permission.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, param = :id) ⇒ Model

Returns a new instance of Model.



35
36
37
38
# File 'lib/lockdown/permission.rb', line 35

def initialize(name, param = :id)
  @name = name
  @param = param
end

Instance Attribute Details

#associationObject

Returns the value of attribute association.



33
34
35
# File 'lib/lockdown/permission.rb', line 33

def association
  @association
end

#controller_methodObject

Returns the value of attribute controller_method.



33
34
35
# File 'lib/lockdown/permission.rb', line 33

def controller_method
  @controller_method
end

#model_methodObject

Returns the value of attribute model_method.



33
34
35
# File 'lib/lockdown/permission.rb', line 33

def model_method
  @model_method
end

#nameObject

Returns the value of attribute name.



33
34
35
# File 'lib/lockdown/permission.rb', line 33

def name
  @name
end

#paramObject

Returns the value of attribute param.



33
34
35
# File 'lib/lockdown/permission.rb', line 33

def param
  @param
end

Instance Method Details

#class_nameObject



40
41
42
# File 'lib/lockdown/permission.rb', line 40

def class_name
  self.name.to_s.camelize
end