Class: PuppetForge::V3::User

Inherits:
Base
  • Object
show all
Includes:
LazyAccessors
Defined in:
lib/puppet_forge/v3/user.rb

Overview

Models a Forge user’s account.

Constant Summary

Constants inherited from Base

Base::API_VERSION

Constants included from Connection

Connection::AUTHORIZATION_TOKEN_REGEX, Connection::USER_AGENT

Instance Attribute Summary

Attributes included from Connection

#conn

Instance Method Summary collapse

Methods included from LazyAccessors

#class_name, #fetch, included, #inspect, #method_missing

Methods inherited from Base

all, all_stateless, api_version, #attribute, #attributes, convert_plus_to_space, find, find_request, find_stateless, get_collection, get_collection_request, get_collection_stateless, #has_attribute?, #initialize, lru_cache, lru_cache_key, new_collection, #orm_resp_item, request, split_uri_path, where, where_request, where_stateless

Methods included from Connection

accept_language, accept_language=, authorization, authorization=, default_connection, make_connection, proxy, proxy=

Methods included from LazyRelations

included, #lazy, #lazy_collection, #name, #parent

Constructor Details

This class inherits a constructor from PuppetForge::V3::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PuppetForge::LazyAccessors

Instance Method Details

#modulesPaginatedCollection<Module>

Note:

Because there is no related module data in the record, we can’t use a LazyRelations#lazy_collection here.

Returns a collection of Modules owned by the user.

Returns:



18
19
20
# File 'lib/puppet_forge/v3/user.rb', line 18

def modules
  Module.where(:owner => username)
end