class TeamApi::Endpoint
Public Class Methods
create(site, endpoint_path, data)
click to toggle source
# File lib/team_api/endpoint.rb, line 15 def self.create(site, endpoint_path, data) endpoint = new site, endpoint_path endpoint.process endpoint.name endpoint.content = data.to_json site.pages << endpoint end
new(site, endpoint_path)
click to toggle source
# File lib/team_api/endpoint.rb, line 7 def initialize(site, endpoint_path) @site = site @base = site.source @dir = endpoint_path @name = 'api.json' @data = {} end