Class: OpenTox::Policy::Rule
- Inherits:
-
Object
- Object
- OpenTox::Policy::Rule
- Defined in:
- lib/policy.rb
Overview
rule inside a policy
Instance Attribute Summary collapse
-
#delete ⇒ Object
Returns the value of attribute delete.
-
#get ⇒ Object
Returns the value of attribute get.
-
#name ⇒ Object
Returns the value of attribute name.
-
#post ⇒ Object
Returns the value of attribute post.
-
#put ⇒ Object
Returns the value of attribute put.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(name, uri) ⇒ Rule
constructor
A new instance of Rule.
- #rename(new, old) ⇒ Object
Constructor Details
#initialize(name, uri) ⇒ Rule
Returns a new instance of Rule.
217 218 219 220 |
# File 'lib/policy.rb', line 217 def initialize(name, uri) @name = name @uri = uri end |
Instance Attribute Details
#delete ⇒ Object
Returns the value of attribute delete.
215 216 217 |
# File 'lib/policy.rb', line 215 def delete @delete end |
#get ⇒ Object
Returns the value of attribute get.
215 216 217 |
# File 'lib/policy.rb', line 215 def get @get end |
#name ⇒ Object
Returns the value of attribute name.
215 216 217 |
# File 'lib/policy.rb', line 215 def name @name end |
#post ⇒ Object
Returns the value of attribute post.
215 216 217 |
# File 'lib/policy.rb', line 215 def post @post end |
#put ⇒ Object
Returns the value of attribute put.
215 216 217 |
# File 'lib/policy.rb', line 215 def put @put end |
#uri ⇒ Object
Returns the value of attribute uri.
215 216 217 |
# File 'lib/policy.rb', line 215 def uri @uri end |
Instance Method Details
#rename(new, old) ⇒ Object
222 223 224 225 |
# File 'lib/policy.rb', line 222 def rename(new, old) self[new] = self.delete(old) self[new].name = new end |