Class: Twirbet::Method
- Inherits:
-
Object
- Object
- Twirbet::Method
- Extended by:
- T::Sig
- Includes:
- Comparable
- Defined in:
- lib/twirbet/method.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#ruby_method ⇒ Object
readonly
Returns the value of attribute ruby_method.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(name, request, response, ruby_method:) ⇒ Method
constructor
A new instance of Method.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/twirbet/method.rb', line 10 def name @name end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
13 14 15 |
# File 'lib/twirbet/method.rb', line 13 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
16 17 18 |
# File 'lib/twirbet/method.rb', line 16 def response @response end |
#ruby_method ⇒ Object (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 |