Class: Xaases::Api
- Inherits:
-
Object
- Object
- Xaases::Api
- Defined in:
- lib/xaases/api.rb
Instance Method Summary collapse
-
#initialize(method, path) ⇒ Api
constructor
A new instance of Api.
- #name ⇒ Object
Constructor Details
#initialize(method, path) ⇒ Api
Returns a new instance of Api.
3 4 5 6 |
# File 'lib/xaases/api.rb', line 3 def initialize(method, path) @method = method.upcase @path = path end |
Instance Method Details
#name ⇒ Object
8 9 10 11 12 |
# File 'lib/xaases/api.rb', line 8 def name s = path.sub(/\A\//, '').sub(/\//, '_') s = 'root' if method == 'GET' && s == '' s end |