Class: TryApi::Method
- Inherits:
-
Base
- Object
- Base
- TryApi::Method
show all
- Defined in:
- app/models/try_api/method.rb
Instance Attribute Summary
Attributes inherited from Base
#id
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #load_inclusion, load_inclusion, #project, typesafe_accessor
Constructor Details
This class inherits a constructor from TryApi::Base
Instance Method Details
#full_path ⇒ Object
15
16
17
|
# File 'app/models/try_api/method.rb', line 15
def full_path
"#{ project.endpoint }/#{ project.api_prefix }#{ self.path }"
end
|
#local_path ⇒ Object
19
20
21
|
# File 'app/models/try_api/method.rb', line 19
def local_path
"/#{ self.project.api_prefix }#{ self.path }"
end
|
#to_json ⇒ Object
11
12
13
|
# File 'app/models/try_api/method.rb', line 11
def to_json
super.merge local_path: local_path, full_path: full_path
end
|