Class: Deltacloud::Exceptions::Exceptions
- Inherits:
-
Object
- Object
- Deltacloud::Exceptions::Exceptions
- Defined in:
- lib/deltacloud/drivers/exceptions.rb
Instance Attribute Summary collapse
-
#exception_definitions ⇒ Object
readonly
Returns the value of attribute exception_definitions.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Exceptions
constructor
A new instance of Exceptions.
- #on(*conditions, &block) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Exceptions
Returns a new instance of Exceptions.
184 185 186 187 188 |
# File 'lib/deltacloud/drivers/exceptions.rb', line 184 def initialize(&block) @exception_definitions = [] instance_eval(&block) if block_given? self end |
Instance Attribute Details
#exception_definitions ⇒ Object (readonly)
Returns the value of attribute exception_definitions.
182 183 184 |
# File 'lib/deltacloud/drivers/exceptions.rb', line 182 def exception_definitions @exception_definitions end |
Instance Method Details
#on(*conditions, &block) ⇒ Object
190 191 192 |
# File 'lib/deltacloud/drivers/exceptions.rb', line 190 def on(*conditions, &block) @exception_definitions << ExceptionDef::new(conditions, &block) if block_given? end |