class GitHubV3API::Entity

This is the base class used for value objects returned by the API. See descendent classes for more details.

Public Class Methods

new(api, data) click to toggle source
api

an instance of the API class associated with the subclass of Entity being instantiated.

data

a Hash with keys corresponding to the data fields for the subclass of Entity being instantiated

# File lib/github_v3_api/entity.rb, line 15
def initialize(api, data)
  @api = api
  @data = data
end

Protected Instance Methods

data() click to toggle source

Provides access to the raw data hash for subclasses.

# File lib/github_v3_api/entity.rb, line 43
def data
  @data
end

Private Instance Methods

api() click to toggle source

Provides access to the api object for subclasses

# File lib/github_v3_api/entity.rb, line 56
def api
  @api
end