Class: Raven::Interface
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Raven::Interface
- Includes:
- Hashie::Extensions::Dash::IndifferentAccess
- Defined in:
- lib/raven/interfaces.rb
Direct Known Subclasses
ExceptionInterface, HttpInterface, MessageInterface, StacktraceInterface, StacktraceInterface::Frame
Class Method Summary collapse
Instance Method Summary collapse
- #assert_required_properties_set! ⇒ Object
-
#initialize(attributes = {}, &block) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(attributes = {}, &block) ⇒ Interface
Returns a new instance of Interface.
12 13 14 15 16 17 18 |
# File 'lib/raven/interfaces.rb', line 12 def initialize(attributes = {}, &block) @check_required = false super(attributes) block.call(self) if block @check_required = true assert_required_properties_set! end |
Class Method Details
.name(value = nil) ⇒ Object
24 25 26 27 |
# File 'lib/raven/interfaces.rb', line 24 def self.name(value = nil) @interface_name = value if value @interface_name end |
Instance Method Details
#assert_required_properties_set! ⇒ Object
20 21 22 |
# File 'lib/raven/interfaces.rb', line 20 def assert_required_properties_set! super if @check_required end |