Class: Sofia::Types::Client::Adapter
- Inherits:
-
Object
- Object
- Sofia::Types::Client::Adapter
- Defined in:
- lib/sofia/types/client/adapter.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
: singleton(Sofia::Adapter::Base).
Instance Method Summary collapse
-
#initialize(adapter = :net_http) ⇒ Adapter
constructor
: (?untyped adapter) -> void.
-
#to_sym ⇒ Object
: -> Symbol.
Constructor Details
#initialize(adapter = :net_http) ⇒ Adapter
: (?untyped adapter) -> void
13 14 15 16 17 |
# File 'lib/sofia/types/client/adapter.rb', line 13 def initialize(adapter = :net_http) name, klass = validate_and_set(adapter || :net_http) @name = T.let(name, Symbol) @klass = T.let(klass, T.class_of(Sofia::Adapter::Base)) end |
Instance Attribute Details
#klass ⇒ Object (readonly)
: singleton(Sofia::Adapter::Base)
10 11 12 |
# File 'lib/sofia/types/client/adapter.rb', line 10 def klass @klass end |
Instance Method Details
#to_sym ⇒ Object
: -> Symbol
20 21 22 |
# File 'lib/sofia/types/client/adapter.rb', line 20 def to_sym @name end |