Module: Apis::Registerable
- Included in:
- Adapter, Middleware::Request, Middleware::Response
- Defined in:
- lib/apis.rb
Instance Method Summary collapse
Instance Method Details
#lookup(symbol) ⇒ Object
16 17 18 19 |
# File 'lib/apis.rb', line 16 def lookup(symbol) @lookup_table ||= {} self.const_get(@lookup_table[symbol]) end |
#register(symbol, klass) ⇒ Object
11 12 13 14 |
# File 'lib/apis.rb', line 11 def register(symbol, klass) @lookup_table ||= {} @lookup_table[symbol] = klass end |