Class: Sentry::Interface
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.inherited(klass) ⇒ Object
3
4
5
6
7
|
# File 'lib/sentry/interface.rb', line 3
def self.inherited(klass)
name = klass.name.split("::").last.downcase.gsub("interface", "")
registered[name.to_sym] = klass
super
end
|
.registered ⇒ Object
9
10
11
|
# File 'lib/sentry/interface.rb', line 9
def self.registered
@@registered ||= {}
end
|
Instance Method Details
13
14
15
|
# File 'lib/sentry/interface.rb', line 13
def to_hash
Hash[instance_variables.map { |name| [name[1..-1].to_sym, instance_variable_get(name)] }]
end
|