Class: Percy::Client

Inherits:
Object
  • Object
show all
Includes:
Builds, Connection, Resources, Snapshots
Defined in:
lib/percy/client.rb,
lib/percy/client/builds.rb,
lib/percy/client/version.rb,
lib/percy/client/resources.rb,
lib/percy/client/snapshots.rb,
lib/percy/client/connection.rb,
lib/percy/client/environment.rb

Defined Under Namespace

Modules: Builds, Connection, Environment, Resources, Snapshots Classes: BadGatewayError, BadRequestError, ClientError, CloudflareError, ConflictError, ConnectionFailed, Error, ForbiddenError, GatewayTimeoutError, HttpError, InternalServerError, NotFoundError, PaymentRequiredError, Resource, ServerError, ServiceUnavailableError, TimeoutError, UnauthorizedError

Constant Summary collapse

VERSION =
'2.1.1'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Resources

#upload_resource

Methods included from Snapshots

#create_snapshot, #finalize_snapshot

Methods included from Builds

#create_build, #finalize_build

Methods included from Connection

#_api_version, #_headers, #_reset_user_agent, #_ruby_version, #_user_agent, #connection, #get, #post

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



76
77
78
79
80
# File 'lib/percy/client.rb', line 76

def initialize(options = {})
  @config = options[:config] || Percy::Config.new
  @client_info = options[:client_info]
  @environment_info = options[:environment_info]
end

Instance Attribute Details

#client_infoObject (readonly)

Returns the value of attribute client_info.



74
75
76
# File 'lib/percy/client.rb', line 74

def client_info
  @client_info
end

#configObject (readonly)

Returns the value of attribute config.



74
75
76
# File 'lib/percy/client.rb', line 74

def config
  @config
end

#environment_infoObject (readonly)

Returns the value of attribute environment_info.



74
75
76
# File 'lib/percy/client.rb', line 74

def environment_info
  @environment_info
end