mega_lotto_baxter2 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: aa8e774f8508657adb5cff8e0fb64f7717603d7bbdf7175d9fd37e9f4c6b83c1
4
- data.tar.gz: 6afc97d9c645083126381cabde643e4c102b2121fbf3a06751aa6cf0d794b89c
3
+ metadata.gz: 0ed652b1168359b583eabad9f5ca027373a3168870c273aeca84e47c86b19498
4
+ data.tar.gz: f29a9596a570feb2386a1d278fe8e4597a98cb88faf0b7c02bff52ef5100b75f
5
5
  SHA512:
6
- metadata.gz: efecbc8d89c67d9ed48769ab6cfba9868bdbe3cf32f40ae797c2902c13829967e8a13e4d8995180aeda958b80915439b75f898baa80c55a8905fe76758e65d83
7
- data.tar.gz: 16f45fd52aef4f18b20526f11154696673d5af55cf2ec03c561d5b9e1fd94c93e958f1a63028e84e5774533a52cf7fedbd563a0b8060f515c4e355416f293ed2
6
+ metadata.gz: 768fb49fd31624032b489d6b8473ea78cf91ed501331470cc131e8da37863746189c73be6b7c299108c209cb4cae71466a8730d1679857eefdeed12339a933dd
7
+ data.tar.gz: c349def777f4be6235de963cea277117e0fe58c6dd583cf6013bcd0faa645cd4ef13915195e970aa22cf5678d3fba54f626beef617780a2b67f60affc0e39351
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mega_lotto_baxter2 (0.2.0)
4
+ mega_lotto_baxter2 (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/exe/mega_lotto ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/exe/env ruby
2
+
3
+ require_relative "../lib/mega_lotto_baxter2/drawing"
4
+
5
+ drawing = MegaLotto::Drawing.new.draw
6
+ puts drawing
@@ -0,0 +1,9 @@
1
+ module MegaLotto
2
+ class Configuration
3
+ attr_accessor :drawing_count
4
+
5
+ def initialize
6
+ @drawing_count = 6
7
+ end
8
+ end
9
+ end
@@ -1,7 +1,7 @@
1
1
  module MegaLotto
2
2
  class Drawing
3
3
  def draw
4
- 6.times.map { single_draw }
4
+ MegaLotto.configuration.drawing_count.times.map { single_draw }
5
5
  end
6
6
 
7
7
  private
@@ -1,3 +1,3 @@
1
1
  module MegaLotto
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require "mega_lotto_baxter2/version"
2
+ require "mega_lotto_baxter2/configuration"
2
3
  require "mega_lotto_baxter2/drawing"
3
4
 
4
5
  begin
@@ -7,4 +8,19 @@ rescue LoadError
7
8
  end
8
9
 
9
10
  module MegaLotto
11
+ class << self
12
+ attr_accessor :configuration
13
+ end
14
+
15
+ def self.configuration
16
+ @configuration ||= Configuration.new
17
+ end
18
+
19
+ def self.reset
20
+ @configuration = Configuration.new
21
+ end
22
+
23
+ def self.configure
24
+ yield(configuration)
25
+ end
10
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mega_lotto_baxter2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - baxter2
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-09 00:00:00.000000000 Z
11
+ date: 2018-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -69,7 +69,8 @@ dependencies:
69
69
  description: ''
70
70
  email:
71
71
  - baxcallan@gmail.com
72
- executables: []
72
+ executables:
73
+ - mega_lotto
73
74
  extensions: []
74
75
  extra_rdoc_files: []
75
76
  files:
@@ -85,7 +86,9 @@ files:
85
86
  - Rakefile
86
87
  - bin/console
87
88
  - bin/setup
89
+ - exe/mega_lotto
88
90
  - lib/mega_lotto_baxter2.rb
91
+ - lib/mega_lotto_baxter2/configuration.rb
89
92
  - lib/mega_lotto_baxter2/drawing.rb
90
93
  - lib/mega_lotto_baxter2/version.rb
91
94
  - mega_lotto_baxter2.gemspec