Class: Hatchet::ShellThrottle::FakeResponse
- Inherits:
-
Object
- Object
- Hatchet::ShellThrottle::FakeResponse
- Defined in:
- lib/hatchet/shell_throttle.rb
Overview
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, remaining:) ⇒ FakeResponse
constructor
A new instance of FakeResponse.
Constructor Details
#initialize(status:, remaining:) ⇒ FakeResponse
Returns a new instance of FakeResponse.
60 61 62 63 64 65 66 67 68 |
# File 'lib/hatchet/shell_throttle.rb', line 60 def initialize(status:, remaining: ) @status = status @headers = { "RateLimit-Remaining" => remaining, "RateLimit-Multiplier" => 1, "Content-Type" => "text/plain".freeze } end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
58 59 60 |
# File 'lib/hatchet/shell_throttle.rb', line 58 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
58 59 60 |
# File 'lib/hatchet/shell_throttle.rb', line 58 def status @status end |