Class: Raven::Interface
Direct Known Subclasses
ExceptionInterface, HttpInterface, MessageInterface, SingleExceptionInterface, StacktraceInterface, StacktraceInterface::Frame
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = nil) {|_self| ... } ⇒ Interface
constructor
A new instance of Interface.
- #to_hash ⇒ Object
Constructor Details
#initialize(attributes = nil) {|_self| ... } ⇒ Interface
Returns a new instance of Interface.
3 4 5 6 7 8 9 |
# File 'lib/raven/interface.rb', line 3 def initialize(attributes = nil) attributes&.each do |attr, value| public_send "#{attr}=", value end yield self if block_given? end |
Class Method Details
.inherited(klass) ⇒ Object
11 12 13 14 15 |
# File 'lib/raven/interface.rb', line 11 def self.inherited(klass) name = klass.name.split("::").last.downcase.gsub("interface", "") registered[name.to_sym] = klass super end |
.registered ⇒ Object
17 18 19 |
# File 'lib/raven/interface.rb', line 17 def self.registered @@registered ||= {} # rubocop:disable Style/ClassVars end |