Class: OpenTox::Policy::Rule

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

Overview

rule inside a policy

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#deleteObject

Returns the value of attribute delete.



215
216
217
# File 'lib/policy.rb', line 215

def delete
  @delete
end

#getObject

Returns the value of attribute get.



215
216
217
# File 'lib/policy.rb', line 215

def get
  @get
end

#nameObject

Returns the value of attribute name.



215
216
217
# File 'lib/policy.rb', line 215

def name
  @name
end

#postObject

Returns the value of attribute post.



215
216
217
# File 'lib/policy.rb', line 215

def post
  @post
end

#putObject

Returns the value of attribute put.



215
216
217
# File 'lib/policy.rb', line 215

def put
  @put
end

#uriObject

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