Class: Ritsudo::Request
- Inherits:
-
Object
- Object
- Ritsudo::Request
- Defined in:
- lib/ritsudo/request.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(request_id, messages) ⇒ Request
constructor
A new instance of Request.
- #processing? ⇒ Boolean
- #time ⇒ Object
- #type ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_id, messages) ⇒ Request
Returns a new instance of Request.
16 17 18 19 |
# File 'lib/ritsudo/request.rb', line 16 def initialize(request_id, ) @request_id = request_id @messages = end |
Instance Attribute Details
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
3 4 5 |
# File 'lib/ritsudo/request.rb', line 3 def @messages end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
4 5 6 |
# File 'lib/ritsudo/request.rb', line 4 def request_id @request_id end |
Class Method Details
Instance Method Details
#processing? ⇒ Boolean
35 36 37 |
# File 'lib/ritsudo/request.rb', line 35 def processing? && ! end |
#time ⇒ Object
21 22 23 24 |
# File 'lib/ritsudo/request.rb', line 21 def time return nil unless && ((. - .) * 1000) # msec end |
#type ⇒ Object
54 55 56 |
# File 'lib/ritsudo/request.rb', line 54 def type &.param("type") || 'etc' end |
#url ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/ritsudo/request.rb', line 26 def url if _url = &.url url = URI.parse(_url) url.to_s.sub(url.query.to_s, '') else nil end end |