Class: Twirbet::Method

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Comparable
Defined in:
lib/twirbet/method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, request, response, ruby_method:) ⇒ Method

Returns a new instance of Method.



22
23
24
25
26
27
# File 'lib/twirbet/method.rb', line 22

def initialize(name, request, response, ruby_method:)
  @name = name
  @request = request
  @response = response
  @ruby_method = ruby_method
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/twirbet/method.rb', line 10

def name
  @name
end

#requestObject (readonly)

Returns the value of attribute request.



13
14
15
# File 'lib/twirbet/method.rb', line 13

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



16
17
18
# File 'lib/twirbet/method.rb', line 16

def response
  @response
end

#ruby_methodObject (readonly)

Returns the value of attribute ruby_method.



19
20
21
# File 'lib/twirbet/method.rb', line 19

def ruby_method
  @ruby_method
end

Instance Method Details

#<=>(other) ⇒ Object



30
31
32
# File 'lib/twirbet/method.rb', line 30

def <=>(other)
  [name, request, response, ruby_method] <=> [other.name, other.request, other.response, other.ruby_method]
end