Class: Lockdown::Context
- Inherits:
-
Object
- Object
- Lockdown::Context
- Defined in:
- lib/lockdown/context.rb
Direct Known Subclasses
ControllerContext, ModelContext, ModelWhereContext, RootContext
Instance Attribute Summary collapse
-
#allowed_methods ⇒ Object
Returns the value of attribute allowed_methods.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#allowed_methods ⇒ Object
Returns the value of attribute allowed_methods.
3 4 5 |
# File 'lib/lockdown/context.rb', line 3 def allowed_methods @allowed_methods end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/lockdown/context.rb', line 3 def name @name end |
Instance Method Details
#allows?(method_name) ⇒ Boolean
9 10 11 |
# File 'lib/lockdown/context.rb', line 9 def allows?(method_name) @allowed_methods.include?(method_name) end |
#to_s ⇒ Object
5 6 7 |
# File 'lib/lockdown/context.rb', line 5 def to_s self.class.to_s end |