Class: TryApi::Method

Inherits:
Base
  • Object
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_pathObject



18
19
20
# File 'app/models/try_api/method.rb', line 18

def full_path
  "#{ project.endpoint }/#{ project.api_prefix }#{ self.path }"
end

#local_pathObject



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