Class: Rester::Service::Request
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- Rester::Service::Request
- Defined in:
- lib/rester/service/request.rb
Instance Attribute Summary collapse
-
#object_chain ⇒ Object
readonly
Returns the value of attribute object_chain.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
- #valid? ⇒ Boolean
Constructor Details
#initialize(env) ⇒ Request
Returns a new instance of Request.
9 10 11 12 |
# File 'lib/rester/service/request.rb', line 9 def initialize(env) super _parse_path if valid? end |
Instance Attribute Details
#object_chain ⇒ Object (readonly)
Returns the value of attribute object_chain.
7 8 9 |
# File 'lib/rester/service/request.rb', line 7 def object_chain @object_chain end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/rester/service/request.rb', line 6 def version @version end |
Instance Method Details
#valid? ⇒ Boolean
14 15 16 |
# File 'lib/rester/service/request.rb', line 14 def valid? path.length < 256 && %r{\A/v\d+/(\w+/?)+\z}.match(path) end |