Skip to content

Commit 9b69f5a

Browse files
singleton classes type for instance
Signed-off-by: Laurent Martin <laurent.martin.l@gmail.com>
1 parent a1e65b8 commit 9b69f5a

14 files changed

Lines changed: 54 additions & 0 deletions

File tree

lib/aspera/agent/factory.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
module Aspera
77
module Agent
88
# Factory for Agents
9+
#
10+
# @!method self.instance
11+
# Returns the singleton instance of Factory
12+
# @return [Factory] the singleton instance
913
class Factory
1014
include Singleton
1115

lib/aspera/ascp/installation.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ module Ascp
2727
# It is used by object : AgentDirect to find necessary resources
2828
# By default it takes the first Aspera product found
2929
# The user can specify `ascp` location by calling: `sdk_folder=` method
30+
#
31+
# @!method self.instance
32+
# Returns the singleton instance of Installation
33+
# @return [Installation] the singleton instance
3034
class Installation
3135
include Singleton
3236

lib/aspera/cli/plugins/factory.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ module Aspera
99
module Cli
1010
# Instantiate plugin from well-known locations
1111
module Plugins
12+
# @!method self.instance
13+
# Returns the singleton instance of Factory
14+
# @return [Factory] the singleton instance
1215
class Factory
1316
include Singleton
1417

lib/aspera/data_repository.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
module Aspera
88
# a simple binary data repository
9+
#
10+
# @!method self.instance
11+
# Returns the singleton instance of DataRepository
12+
# @return [DataRepository] the singleton instance
913
class DataRepository
1014
include Singleton
1115

lib/aspera/environment.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313

1414
module Aspera
1515
# detect OS, architecture, and specific stuff
16+
#
17+
# @!method self.instance
18+
# Returns the singleton instance of Environment
19+
# @return [Environment] the singleton instance
1620
class Environment
1721
include Singleton
1822

@@ -266,6 +270,7 @@ def fix_home
266270
return unless @os.eql?(OS_WINDOWS) && ENV.key?('USERPROFILE') && Dir.exist?(ENV.fetch('USERPROFILE', nil))
267271
ENV['HOME'] = ENV.fetch('USERPROFILE', nil)
268272
Log.log.debug{"Windows: set HOME to USERPROFILE: #{Dir.home}"}
273+
nil
269274
end
270275

271276
def graphical?

lib/aspera/log.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ def make_methods(str_level)
5454

5555
module Aspera
5656
# Singleton object for logging
57+
#
58+
# @!method self.instance
59+
# Returns the singleton instance of Log
60+
# @return [Log] the singleton instance
5761
class Log
5862
include Singleton
5963

lib/aspera/oauth/factory.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
module Aspera
88
module OAuth
99
# Factory to create tokens and manage their cache
10+
#
11+
# @!method self.instance
12+
# Returns the singleton instance of Factory
13+
# @return [Factory] the singleton instance
1014
class Factory
1115
include Singleton
1216

lib/aspera/preview/file_types.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
module Aspera
99
module Preview
1010
# function conversion_type returns one of the types: CONVERSION_TYPES
11+
#
12+
# @!method self.instance
13+
# Returns the singleton instance of FileTypes
14+
# @return [FileTypes] the singleton instance
1115
class FileTypes
1216
include Singleton
1317

lib/aspera/products/connect.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
module Aspera
77
module Products
8+
# @!method self.instance
9+
# Returns the singleton instance of Connect
10+
# @return [Connect] the singleton instance
811
class Connect
912
include Singleton
1013

lib/aspera/rest.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ module Aspera
3030
# @param download_partial_suffix [String] suffix for partial download
3131
# @param session_cb [lambda] lambda called on new HTTP session. Takes the Net::HTTP as arg. Used to change parameters on creation.
3232
# @param progress_bar [Object] progress bar object called for file transfer
33+
#
34+
# @!method self.instance
35+
# Returns the singleton instance of RestParameters
36+
# @return [RestParameters] the singleton instance
3337
class RestParameters
3438
include Singleton
3539

0 commit comments

Comments
 (0)