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
18
19
20
|
# File 'app/models/try_api/method.rb', line 18
def full_path
"#{ project.endpoint }/#{ project.api_prefix }#{ self.path }"
end
|
#local_path ⇒ Object
22
23
24
|
# File 'app/models/try_api/method.rb', line 22
def local_path
"/#{ self.api_prefix || self.project.api_prefix }#{ self.path }"
end
|
#to_json(id) ⇒ Object
14
15
16
|
# File 'app/models/try_api/method.rb', line 14
def to_json(id)
super(id).merge local_path: local_path, full_path: full_path
end
|