mr_loga_loga 0.1.0 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +2 -0
- data/.github/workflows/main.yml +0 -1
- data/.github/workflows/release.yml +79 -0
- data/.gitignore +1 -0
- data/.tool-versions +1 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +31 -0
- data/Gemfile.lock +7 -5
- data/README.md +12 -8
- data/docs/MrLogaLoga/Configuration.html +376 -0
- data/docs/MrLogaLoga/Context.html +628 -0
- data/docs/MrLogaLoga/Error.html +124 -0
- data/docs/MrLogaLoga/Extensions/LogrageExtension.html +305 -0
- data/docs/MrLogaLoga/Extensions/RailsExtension/LoggerPatch.html +322 -0
- data/docs/MrLogaLoga/Extensions/RailsExtension/ServerPatch.html +201 -0
- data/docs/MrLogaLoga/Extensions/RailsExtension.html +242 -0
- data/docs/MrLogaLoga/Extensions.html +117 -0
- data/docs/MrLogaLoga/Formatters/Json.html +350 -0
- data/docs/MrLogaLoga/Formatters/KeyValue.html +338 -0
- data/docs/MrLogaLoga/Formatters.html +117 -0
- data/docs/MrLogaLoga/InstanceMethods.html +350 -0
- data/docs/MrLogaLoga/Logger.html +618 -0
- data/docs/MrLogaLoga/LoggerProxy.html +319 -0
- data/docs/MrLogaLoga.html +374 -0
- data/docs/_config.yml +1 -0
- data/docs/_index.html +280 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +497 -0
- data/docs/file.README.html +255 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +255 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +283 -0
- data/docs/top-level-namespace.html +110 -0
- data/lib/mr_loga_loga/context.rb +10 -0
- data/lib/mr_loga_loga/extensions/{lograge_patch.rb → lograge.rb} +19 -8
- data/lib/mr_loga_loga/extensions/rails.rb +142 -0
- data/lib/mr_loga_loga/formatters/json.rb +4 -4
- data/lib/mr_loga_loga/formatters/key_value.rb +2 -1
- data/lib/mr_loga_loga/instance_methods.rb +9 -3
- data/lib/mr_loga_loga/logger.rb +23 -14
- data/lib/mr_loga_loga/logger_proxy.rb +9 -8
- data/lib/mr_loga_loga/version.rb +1 -1
- data/lib/mr_loga_loga.rb +3 -4
- data/mr_loga_loga.gemspec +4 -4
- metadata +57 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 606efac4895e737ab02c1e96818c4ebb2dbc537a8e7b5b7871ad32322fc63da1
|
4
|
+
data.tar.gz: 16c3bc2ad45e9b456f8584c507be9f057384f4f34e14588d8ed9f88352c7797c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcf4b5fb67d75ca7e7214e9240790cffaaf6351142d152944f5c933611c8fae4b8d0c8b8f003ba928a5e911867a8080d2357d086cc061ddfacc981d6554965b3
|
7
|
+
data.tar.gz: 1a0c3ec86d9053b56f2aa7bd05648f5f9280462c88b7a090f4a05e0866783119771e0b253d1e8896d5366de46856666c43c4e6edda79b0ad883de3081e3aeb76
|
data/.codeclimate.yml
ADDED
data/.github/workflows/main.yml
CHANGED
@@ -0,0 +1,79 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ main ]
|
6
|
+
workflow_dispatch:
|
7
|
+
inputs:
|
8
|
+
version:
|
9
|
+
description: 'The release version'
|
10
|
+
required: true
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
prepare-release:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
outputs:
|
16
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
17
|
+
version: ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2
|
21
|
+
- name: Generate Release 🗒️
|
22
|
+
uses: GoogleCloudPlatform/release-please-action@v3
|
23
|
+
id: release
|
24
|
+
with:
|
25
|
+
release-type: ruby
|
26
|
+
package-name: mr-loga-loga
|
27
|
+
bump-minor-pre-major: true
|
28
|
+
version-file: 'dummy.rb' # Don't set the version file, we do version increments ourselves on release
|
29
|
+
|
30
|
+
release:
|
31
|
+
needs: prepare-release
|
32
|
+
runs-on: ubuntu-latest
|
33
|
+
if: needs.prepare-release.outputs.release_created || github.event_name == 'workflow_dispatch'
|
34
|
+
|
35
|
+
steps:
|
36
|
+
- uses: actions/checkout@v2
|
37
|
+
|
38
|
+
- name: Set up Ruby
|
39
|
+
uses: ruby/setup-ruby@v1
|
40
|
+
with:
|
41
|
+
bundler-cache: true
|
42
|
+
env:
|
43
|
+
BUNDLE_WITHOUT: 'development'
|
44
|
+
|
45
|
+
- name: Release Version
|
46
|
+
id: release-version
|
47
|
+
run: |
|
48
|
+
if [[ ${{github.event_name}} == 'workflow_dispatch' ]]; then
|
49
|
+
version=${{ github.event.inputs.version }}
|
50
|
+
else
|
51
|
+
version=${{ needs.prepare-release.outputs.version }}
|
52
|
+
fi
|
53
|
+
echo "::set-output name=version::$version"
|
54
|
+
|
55
|
+
- name: Bump Gem Version
|
56
|
+
run: |
|
57
|
+
sed -i "s|\(VERSION = \)'.*'|\1'${{ steps.release-version.outputs.version }}'|" lib/mr_loga_loga/version.rb
|
58
|
+
|
59
|
+
- name: Update Gemfile.lock
|
60
|
+
run: |
|
61
|
+
bundle config unset deployment
|
62
|
+
bundle install --jobs 4
|
63
|
+
|
64
|
+
- name: Publish Gem 💎
|
65
|
+
run: |
|
66
|
+
mkdir -p $HOME/.gem
|
67
|
+
touch $HOME/.gem/credentials
|
68
|
+
chmod 0600 $HOME/.gem/credentials
|
69
|
+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
|
70
|
+
gem build *.gemspec
|
71
|
+
gem push *.gem
|
72
|
+
env:
|
73
|
+
RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
74
|
+
|
75
|
+
- name: Commit Updated Files 📤
|
76
|
+
uses: EndBug/add-and-commit@v7
|
77
|
+
with:
|
78
|
+
add: "['Gemfile.lock', 'lib/mr_loga_loga/version.rb']"
|
79
|
+
message: "chore: post-release ${{ steps.release-version.outputs.version }}"
|
data/.gitignore
CHANGED
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.0.0
|
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--output-dir docs
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,36 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
### [0.1.4](https://github.com/hschne/mr-loga-loga/compare/v0.1.3...v0.1.4) (2022-01-22)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* error formatting for keyvalue formatter, fixes [#7](https://github.com/hschne/mr-loga-loga/issues/7) ([a64d822](https://github.com/hschne/mr-loga-loga/commit/a64d8225691d55e1eb42df57afcb950d76f5f59b))
|
9
|
+
|
10
|
+
### [0.1.3](https://github.com/hschne/mr-loga-loga/compare/v0.1.2...v0.1.3) (2022-01-14)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* json formatter errors ([874f3dd](https://github.com/hschne/mr-loga-loga/commit/874f3dd480e05792712495eb6b7c77c35474adc1))
|
16
|
+
|
17
|
+
### [0.1.2](https://github.com/hschne/mr-loga-loga/compare/v0.1.1...v0.1.2) (2022-01-05)
|
18
|
+
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* improve rails patch ([a31cdf1](https://github.com/hschne/mr-loga-loga/commit/a31cdf1b655bfaeb2351bff818ca0af83293ace5))
|
23
|
+
* only delegate when logger is loga loga ([55bd0db](https://github.com/hschne/mr-loga-loga/commit/55bd0dbdee5b975c80effac90e989eb08d2b6948))
|
24
|
+
|
25
|
+
### [0.1.1](https://www.github.com/hschne/mr-loga-loga/compare/v0.1.0...v0.1.1) (2022-01-03)
|
26
|
+
|
27
|
+
|
28
|
+
### Bug Fixes
|
29
|
+
|
30
|
+
* rails compatibility ([81619ef](https://www.github.com/hschne/mr-loga-loga/commit/81619ef76d772ac05eb78daf3714794d345af587))
|
31
|
+
* remove byebug, patch rails, fix logger proxy ([38caf62](https://www.github.com/hschne/mr-loga-loga/commit/38caf625304449e128e9201aeeaf79d24798aa7d))
|
32
|
+
* update initializer signature ([bdd8b72](https://www.github.com/hschne/mr-loga-loga/commit/bdd8b7269111550ff9e2e5e3c6344d6c83707099))
|
33
|
+
|
3
34
|
## [0.1.0] - 2021-11-12
|
4
35
|
|
5
36
|
- Initial release
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mr_loga_loga (0.1.
|
4
|
+
mr_loga_loga (0.1.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.2)
|
10
|
-
byebug (11.1.3)
|
11
10
|
diff-lcs (1.4.4)
|
12
11
|
docile (1.4.0)
|
13
12
|
parallel (1.21.0)
|
@@ -50,18 +49,21 @@ GEM
|
|
50
49
|
simplecov_json_formatter (0.1.3)
|
51
50
|
timecop (0.9.4)
|
52
51
|
unicode-display_width (2.1.0)
|
52
|
+
webrick (1.7.0)
|
53
|
+
yard (0.9.27)
|
54
|
+
webrick (~> 1.7.0)
|
53
55
|
|
54
56
|
PLATFORMS
|
55
57
|
x86_64-linux
|
56
58
|
|
57
59
|
DEPENDENCIES
|
58
|
-
byebug
|
59
60
|
mr_loga_loga!
|
60
61
|
rake (~> 13.0)
|
61
62
|
rspec (~> 3.0)
|
62
63
|
rubocop (~> 1.7)
|
63
|
-
simplecov (~> 0.21
|
64
|
-
timecop (~> 0.9
|
64
|
+
simplecov (~> 0.21)
|
65
|
+
timecop (~> 0.9)
|
66
|
+
yard (~> 0.9)
|
65
67
|
|
66
68
|
BUNDLED WITH
|
67
69
|
2.2.26
|
data/README.md
CHANGED
@@ -10,16 +10,21 @@
|
|
10
10
|
[![Main](https://github.com/hschne/mr-loga-loga/actions/workflows/main.yml/badge.svg)](https://github.com/hschne/mr-loga-loga/actions/workflows/main.yml)
|
11
11
|
![License](https://img.shields.io/github/license/hschne/mr-loga-loga)
|
12
12
|
|
13
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/7cdd4779e6c62bce6ba0/maintainability)](https://codeclimate.com/github/hschne/mr-loga-loga/maintainability)
|
14
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/7cdd4779e6c62bce6ba0/test_coverage)](https://codeclimate.com/github/hschne/mr-loga-loga/test_coverage)
|
15
|
+
</div>
|
16
|
+
|
13
17
|
## What's this?
|
14
18
|
|
15
|
-
MrLogaLoga is a logger for Ruby that allows you to easily attach contextual information to your log messages.
|
19
|
+
MrLogaLoga is a logger for Ruby that allows you to easily attach contextual information to your log messages.
|
20
|
+
When writing logs, messages only tell half the story. MrLogaLoga allows you to make the most of your logs.
|
16
21
|
|
17
22
|
```ruby
|
18
23
|
logger.info('message', user: 'name', data: 1)
|
19
24
|
# I, [2022-01-01T12:00:00.000000 #19074] INFO -- Main: message user=user data=1
|
20
25
|
```
|
21
26
|
|
22
|
-
You can find out more about the motivation behind the project [here](#why-mrlogaloga). For usage read [Usage](#usage) or [Advanced Usage](#advanced-usage)
|
27
|
+
You can find out more about the motivation behind the project [here](#why-mrlogaloga). For usage read [Usage](#usage) or [Advanced Usage](#advanced-usage).
|
23
28
|
|
24
29
|
**Note**: This gem is in early development. Try it out and leave some feedback, it really goes a long way in helping me out with development. Any [feature request](https://github.com/hschne/mr-loga-loga/issues/new?assignees=&labels=type%3ABug&template=FEATURE_REQUEST.md&title=) or [bug report](https://github.com/hschne/mr-loga-loga/issues/new?assignees=&labels=type%3AEnhancement&template=BUG_REPORT.md&title=) is welcome. If you like this project, leave a star to show your support! ⭐
|
25
30
|
|
@@ -39,7 +44,7 @@ bundle install
|
|
39
44
|
|
40
45
|
## Usage
|
41
46
|
|
42
|
-
MrLogaLoga provides the same interface as the Ruby default logger you are used to. In addition, however, you can attach contextual information to your log messages
|
47
|
+
MrLogaLoga provides the same interface as the Ruby default logger you are used to. In addition, however, you can attach contextual information to your log messages.
|
43
48
|
|
44
49
|
```ruby
|
45
50
|
require 'mr_loga_loga'
|
@@ -65,7 +70,7 @@ logger.user('name').info('message') # Dynamic context method
|
|
65
70
|
logger.user { 'name' }.info('message') # Dynamic context block
|
66
71
|
```
|
67
72
|
|
68
|
-
The block syntax [ is recommended when logging calculated properties ](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html#class-Logger-label-How+to+log+a+message).
|
73
|
+
The block syntax [ is recommended when logging calculated properties ](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html#class-Logger-label-How+to+log+a+message). You can find more in-depth information about specific method in the [Code Documentation](https://www.hschne.at/mr-loga-loga/).
|
69
74
|
|
70
75
|
#### Shared Context
|
71
76
|
|
@@ -111,7 +116,6 @@ class MyClass
|
|
111
116
|
end
|
112
117
|
```
|
113
118
|
|
114
|
-
|
115
119
|
### Formatters
|
116
120
|
|
117
121
|
MrLogaLoga uses the [KeyValue](https://github.com/hschne/mr-loga-loga/blob/main/lib/mr_loga_loga/formatters/key_value.rb) formatter per default. The [Json](https://github.com/hschne/mr-loga-loga/blob/main/lib/mr_loga_loga/formatters/json.rb) formatter is also included. To use a specific formatter pass it to the logger constructor:
|
@@ -125,7 +129,7 @@ You can implement and add your own formatters like so:
|
|
125
129
|
|
126
130
|
```ruby
|
127
131
|
class MyFormatter
|
128
|
-
def call(severity, datetime, progname, message, context)
|
132
|
+
def call(severity, datetime, progname, message, **context)
|
129
133
|
context = context.map { |key, value| "#{key}=#{value}" }.compact.join(' ')
|
130
134
|
"#{severity} #{datetime.strftime('%Y-%m-%dT%H:%M:%S.%6N')} #{progname} #{message} #{context}"
|
131
135
|
end
|
@@ -167,7 +171,7 @@ logger.debug("my message user=#{user} more_data=#{data}")
|
|
167
171
|
|
168
172
|
This is fine, as long as you do not need to change your log format. Changing your log formatter will not change the format of your message, nor the formatting of the contextual information you provided.
|
169
173
|
|
170
|
-
MrLogaLoga addresses this by allowing you to attach contextual information to your logs and giving you full control over how both message and context are formatted.
|
174
|
+
MrLogaLoga addresses this by allowing you to attach contextual information to your logs and giving you full control over how both message and context are formatted. There are other gems doing similar things, most notably [Semantic Logger](https://logger.rocketjob.io/). Where Semantic Logger provides lots of functionality related to logging, MrLogaLoga focuses on making it nice to write log messages - and nothing more.
|
171
175
|
|
172
176
|
## Credit
|
173
177
|
|
@@ -185,7 +189,7 @@ Thank you for contributing! :heart:
|
|
185
189
|
|
186
190
|
We welcome all support, whether on bug reports, code, design, reviews, tests, documentation, translations, or just feature requests.
|
187
191
|
|
188
|
-
Please use [GitHub issues](https://github.com/hschne/
|
192
|
+
Please use [GitHub issues](https://github.com/hschne/mr-loga-loga/issues) to submit bugs or feature requests.
|
189
193
|
|
190
194
|
## License
|
191
195
|
|
@@ -0,0 +1,376 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: MrLogaLoga::Configuration
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.27
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "MrLogaLoga::Configuration";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (C)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../MrLogaLoga.html" title="MrLogaLoga (module)">MrLogaLoga</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Configuration</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: MrLogaLoga::Configuration
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">MrLogaLoga::Configuration</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/mr_loga_loga/configuration.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<h2 id="label-Description">Description</h2>
|
106
|
+
|
107
|
+
<p>The configuration class for MrLogaLoga</p>
|
108
|
+
|
109
|
+
<h2 id="label-Usage">Usage</h2>
|
110
|
+
|
111
|
+
<pre class="code ruby"><code class="ruby">MrLogaLoga.configure do |configuration|
|
112
|
+
configuration.logger = ...
|
113
|
+
end
|
114
|
+
</code></pre>
|
115
|
+
|
116
|
+
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
<div class="tags">
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
127
|
+
<ul class="summary">
|
128
|
+
|
129
|
+
<li class="public ">
|
130
|
+
<span class="summary_signature">
|
131
|
+
|
132
|
+
<a href="#logger-instance_method" title="#logger (instance method)">#<strong>logger</strong> ⇒ Object </a>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
</span>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<span class="summary_desc"><div class='inline'>
|
150
|
+
<p>Returns the value of attribute logger.</p>
|
151
|
+
</div></span>
|
152
|
+
|
153
|
+
</li>
|
154
|
+
|
155
|
+
|
156
|
+
</ul>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<h2>
|
163
|
+
Instance Method Summary
|
164
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
165
|
+
</h2>
|
166
|
+
|
167
|
+
<ul class="summary">
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(**kwargs) ⇒ Configuration </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
<span class="note title constructor">constructor</span>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="summary_desc"><div class='inline'>
|
189
|
+
<p>Initialize the configuration by setting configuration default values.</p>
|
190
|
+
</div></span>
|
191
|
+
|
192
|
+
</li>
|
193
|
+
|
194
|
+
|
195
|
+
<li class="public ">
|
196
|
+
<span class="summary_signature">
|
197
|
+
|
198
|
+
<a href="#reset-instance_method" title="#reset (instance method)">#<strong>reset</strong> ⇒ Object </a>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
</span>
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
<span class="summary_desc"><div class='inline'>
|
213
|
+
<p>Reset the configuration to default values.</p>
|
214
|
+
</div></span>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
|
219
|
+
</ul>
|
220
|
+
|
221
|
+
|
222
|
+
<div id="constructor_details" class="method_details_list">
|
223
|
+
<h2>Constructor Details</h2>
|
224
|
+
|
225
|
+
<div class="method_details first">
|
226
|
+
<h3 class="signature first" id="initialize-instance_method">
|
227
|
+
|
228
|
+
#<strong>initialize</strong>(**kwargs) ⇒ <tt><span class='object_link'><a href="" title="MrLogaLoga::Configuration (class)">Configuration</a></span></tt>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
</h3><div class="docstring">
|
235
|
+
<div class="discussion">
|
236
|
+
|
237
|
+
<p>Initialize the configuration by setting configuration default values</p>
|
238
|
+
|
239
|
+
|
240
|
+
</div>
|
241
|
+
</div>
|
242
|
+
<div class="tags">
|
243
|
+
|
244
|
+
|
245
|
+
</div><table class="source_code">
|
246
|
+
<tr>
|
247
|
+
<td>
|
248
|
+
<pre class="lines">
|
249
|
+
|
250
|
+
|
251
|
+
17
|
252
|
+
18
|
253
|
+
19
|
254
|
+
20</pre>
|
255
|
+
</td>
|
256
|
+
<td>
|
257
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/configuration.rb', line 17</span>
|
258
|
+
|
259
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
260
|
+
<span class='id identifier rubyid_reset'>reset</span>
|
261
|
+
<span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_instance_variable_set'>instance_variable_set</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
262
|
+
<span class='kw'>end</span></pre>
|
263
|
+
</td>
|
264
|
+
</tr>
|
265
|
+
</table>
|
266
|
+
</div>
|
267
|
+
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div id="instance_attr_details" class="attr_details">
|
271
|
+
<h2>Instance Attribute Details</h2>
|
272
|
+
|
273
|
+
|
274
|
+
<span id="logger=-instance_method"></span>
|
275
|
+
<div class="method_details first">
|
276
|
+
<h3 class="signature first" id="logger-instance_method">
|
277
|
+
|
278
|
+
#<strong>logger</strong> ⇒ <tt>Object</tt>
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
</h3><div class="docstring">
|
285
|
+
<div class="discussion">
|
286
|
+
|
287
|
+
<p>Returns the value of attribute logger.</p>
|
288
|
+
|
289
|
+
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
<div class="tags">
|
293
|
+
|
294
|
+
|
295
|
+
</div><table class="source_code">
|
296
|
+
<tr>
|
297
|
+
<td>
|
298
|
+
<pre class="lines">
|
299
|
+
|
300
|
+
|
301
|
+
14
|
302
|
+
15
|
303
|
+
16</pre>
|
304
|
+
</td>
|
305
|
+
<td>
|
306
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/configuration.rb', line 14</span>
|
307
|
+
|
308
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
|
309
|
+
<span class='ivar'>@logger</span>
|
310
|
+
<span class='kw'>end</span></pre>
|
311
|
+
</td>
|
312
|
+
</tr>
|
313
|
+
</table>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
|
319
|
+
<div id="instance_method_details" class="method_details_list">
|
320
|
+
<h2>Instance Method Details</h2>
|
321
|
+
|
322
|
+
|
323
|
+
<div class="method_details first">
|
324
|
+
<h3 class="signature first" id="reset-instance_method">
|
325
|
+
|
326
|
+
#<strong>reset</strong> ⇒ <tt>Object</tt>
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
</h3><div class="docstring">
|
333
|
+
<div class="discussion">
|
334
|
+
|
335
|
+
<p>Reset the configuration to default values</p>
|
336
|
+
|
337
|
+
|
338
|
+
</div>
|
339
|
+
</div>
|
340
|
+
<div class="tags">
|
341
|
+
|
342
|
+
|
343
|
+
</div><table class="source_code">
|
344
|
+
<tr>
|
345
|
+
<td>
|
346
|
+
<pre class="lines">
|
347
|
+
|
348
|
+
|
349
|
+
23
|
350
|
+
24
|
351
|
+
25</pre>
|
352
|
+
</td>
|
353
|
+
<td>
|
354
|
+
<pre class="code"><span class="info file"># File 'lib/mr_loga_loga/configuration.rb', line 23</span>
|
355
|
+
|
356
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reset'>reset</span>
|
357
|
+
<span class='ivar'>@logger</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../MrLogaLoga.html" title="MrLogaLoga (module)">MrLogaLoga</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Logger.html" title="MrLogaLoga::Logger (class)">Logger</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Logger.html#initialize-instance_method" title="MrLogaLoga::Logger#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='gvar'>$stdout</span><span class='rparen'>)</span>
|
358
|
+
<span class='kw'>end</span></pre>
|
359
|
+
</td>
|
360
|
+
</tr>
|
361
|
+
</table>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
</div>
|
365
|
+
|
366
|
+
</div>
|
367
|
+
|
368
|
+
<div id="footer">
|
369
|
+
Generated on Wed Jan 5 09:59:09 2022 by
|
370
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
371
|
+
0.9.27 (ruby-3.0.0).
|
372
|
+
</div>
|
373
|
+
|
374
|
+
</div>
|
375
|
+
</body>
|
376
|
+
</html>
|