Class: Connect::Method::Type
- Inherits:
-
Object
- Object
- Connect::Method::Type
- Defined in:
- lib/connect/method.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #decode(input) ⇒ Object
- #encode(input) ⇒ Object
-
#initialize(klass) ⇒ Type
constructor
A new instance of Type.
- #inspect ⇒ Object
- #stream? ⇒ Boolean
- #unary? ⇒ Boolean
Constructor Details
#initialize(klass) ⇒ Type
Returns a new instance of Type.
8 9 10 |
# File 'lib/connect/method.rb', line 8 def initialize(klass) @klass = klass end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
6 7 8 |
# File 'lib/connect/method.rb', line 6 def klass @klass end |
Instance Method Details
#==(other) ⇒ Object
28 29 30 |
# File 'lib/connect/method.rb', line 28 def ==(other) other.is_a?(Type) && klass == other.klass end |
#decode(input) ⇒ Object
16 17 18 |
# File 'lib/connect/method.rb', line 16 def decode(input) klass.decode(input) end |
#encode(input) ⇒ Object
12 13 14 |
# File 'lib/connect/method.rb', line 12 def encode(input) klass.encode(input) end |
#inspect ⇒ Object
32 33 34 |
# File 'lib/connect/method.rb', line 32 def inspect "#{self.class.name}<#{klass.inspect}>" end |
#stream? ⇒ Boolean
24 25 26 |
# File 'lib/connect/method.rb', line 24 def stream? false end |
#unary? ⇒ Boolean
20 21 22 |
# File 'lib/connect/method.rb', line 20 def unary? false end |