GunnyLog 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30733cb2970e211ec7511c2a7f5ccc4fff19a934
4
- data.tar.gz: 83e967d12adcefe8b87ba9ffb75eea0d114ae5d6
3
+ metadata.gz: 772e6881f38897b22ad442e76899e08311574f7d
4
+ data.tar.gz: 66316fcbe57363e372430524c3ad8daf3aecddbf
5
5
  SHA512:
6
- metadata.gz: 3533e7fe106b06a6bb027986a1afe0e90a735418bfde6e5d677b000b22217504ee2f0c14f27462b5a0ae1676786e56587efc1ac8826b25d23215b740c1b2000a
7
- data.tar.gz: 6e1f4bdf2932551756b1d20f3477d9f8f6f4d6dc4f88896fec961e49f00e662c1b84255eeda46c1ae100b84d599927a731ac94eafc50d951aef70daa81bb01ff
6
+ metadata.gz: f3838e3812c1acca1a4e50bf68ab67f89685d137202c3f4b17f3c4fcd22b9f06ae5c24d801a4202e30b3af417d54c380b1dd9db5defd30581ecba6aca9dcf538
7
+ data.tar.gz: fb42181161be2d5f92f2ea139fcb4a94889b4c2669a173ff10ad0fdee518fdeb800675936d3a35431773a32ad5e88a9db261bc4b86f6e05bac789fa53234d6c4
@@ -4,12 +4,50 @@ require 'GunnyLog/exceptions'
4
4
  require 'singleton'
5
5
  require 'date'
6
6
 
7
-
8
- # GunnyLog logs messages to stdout(default), stderr, or a file
9
- # GunnyLog is a singleton and uses the instance method. Examples:
10
- # log = GunnyLog.instance or GunnyLog.instance.msg('Error message')
7
+ # GunnyLog logs messages to stdout, stderr, or a file. It defaults
8
+ # to stdout. GunnyLog is a singleton and uses the instance method.
9
+ # For example you can use GunnyLog.instance.msg('Error message')
10
+ # or you can use log = GunnyLog.instance
11
11
  class GunnyLog
12
12
 
13
+ include Singleton
14
+
15
+ # public class attributes
16
+
17
+ class << self;
18
+ # Logging flag on and off (default=on)
19
+ private
20
+ attr_accessor :_is_logging_enabled
21
+ end
22
+
23
+ # @return [bool] is logging enabled
24
+ attr_reader :_is_logging_enabled
25
+
26
+ class << self;
27
+ # The location that the message was from
28
+ private
29
+ attr_accessor :message_location
30
+ end
31
+
32
+ # @return [string] message location
33
+ attr_reader :message_location
34
+
35
+ # private class attributes
36
+
37
+ class << self;
38
+ # Is file open flag
39
+ private
40
+ attr_accessor :_is_file_open
41
+ end
42
+
43
+ class << self;
44
+ # File used for the log file
45
+ private
46
+ attr_accessor :logging_file
47
+ end
48
+
49
+ # public instance methods
50
+
13
51
  # Set logging on and off
14
52
  # @param flag [bool] switch for on or off
15
53
  def set_logging_enabled(flag)
@@ -63,7 +101,7 @@ class GunnyLog
63
101
  end
64
102
  end
65
103
 
66
- # Open the logfile with path, name, and extention
104
+ # Open the logfile with path, name, and extension
67
105
  # @param pathname [string] path of the logfile
68
106
  # @param filename [string] name of the logfile
69
107
  # @param extension [string] extension of the logfile
@@ -119,30 +157,9 @@ class GunnyLog
119
157
  message(loc, formatted)
120
158
  end
121
159
 
160
+ # private instance methods
122
161
  private
123
162
 
124
- include Singleton
125
-
126
- class << self;
127
- # Logging off and on flag
128
- attr_accessor :_is_logging_enabled
129
- end
130
-
131
- class << self;
132
- # Location message was logged from
133
- attr_accessor :message_location
134
- end
135
-
136
- class << self;
137
- # Is file open flag
138
- attr_accessor :_is_file_open
139
- end
140
-
141
- class << self;
142
- # File used for the log file
143
- attr_accessor :logging_file
144
- end
145
-
146
163
  # initailize
147
164
  def initialize
148
165
  @_is_logging_enabled = true
@@ -1,3 +1,3 @@
1
1
  class GunnyLog
2
- VERSION = '1.0.8'
2
+ VERSION = '1.0.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: GunnyLog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - GunnyHwy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-10 00:00:00.000000000 Z
11
+ date: 2014-09-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby class for logging to screen or file
14
14
  email: gunnyhwy21@yahoo.com
@@ -44,3 +44,4 @@ signing_key:
44
44
  specification_version: 4
45
45
  summary: Ruby log file class
46
46
  test_files: []
47
+ has_rdoc: