gameon 0.0.0.pre33 → 0.0.0.pre34

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gameon/base.rb +25 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44c569141ef4400e40808b720c3575354ab2272c
4
- data.tar.gz: 9a8be0ec80afd228f4754b169b89bbcbd48cb7ce
3
+ metadata.gz: 46c0cb04ac4848aa1d0bc4dfcb6b822b516083c7
4
+ data.tar.gz: a6db55dfbcf05814bb7e301b83e1d7582a863257
5
5
  SHA512:
6
- metadata.gz: b64040bd5ddabf9a7e75573c2d36a18692948a2177189de496f71bda14c9000446081bb02bb6a9d320753642c19c0123f6c017581bc9d5b8d385002cb28c1cff
7
- data.tar.gz: f8801a833c897da213ea23989b5ac609068458e5b2255e0d1b7ec56606d5f3c8a802037f10830447b867470adc3581628511a9b00f94b350a4df1b1f8e605618
6
+ metadata.gz: 45ade8b2430e195bb5707b68488f681e827fadfb5460b5da2c08cc224d08869ad0781d5f74ba4a9f6a4576f4b0570c51b13e237fba82db308fdcb6d93d3428ff
7
+ data.tar.gz: a3b2de7225255b8ee4a955b108d39d6c9b4c7093fe26430c826cdec032d61da940c06696dfcc61f8a694eacb4cc2116b1bbeabdeb1846135f05faad1c904afa7
data/lib/gameon/base.rb CHANGED
@@ -1,16 +1,34 @@
1
1
  module GameOn
2
+
3
+ module Middleware
4
+ include Mushin::Middleware
5
+ end
6
+
2
7
  module Gamebook
3
8
  extend Mushin::DSL
9
+ def self.find activity_context, activity_statment
10
+ Mushin::DSL.middlewares = []
11
+ Mushin::DSL.contexts.each do |current_context|
12
+ if activity_context == current_context.title
13
+ current_context.statments.each do |statment|
14
+ if activity_statment == statment.title
15
+ statment.activations.each do |middleware|
16
+ Mushin::DSL.middlewares << middleware
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ Mushin::DSL.middlewares
23
+ end
4
24
  end
5
25
 
6
- module Middleware
7
- include Mushin::Customization
26
+ module Engine
27
+ extend Mushin::Engine
8
28
  end
9
29
 
10
30
  module Env
11
- include Mushin::Env
12
- extend Mushin::DSL
13
- extend Mushin::Engine
31
+ extend Mushin::Env
14
32
 
15
33
  @domain_folder = 'gameon'
16
34
  @ds = 'GameOn::Persistence::DS'
@@ -27,9 +45,9 @@ module GameOn
27
45
  def activity statment
28
46
  @activities += [statment]
29
47
  end
30
- class_eval(&block)
48
+ instance_eval(&block)
31
49
  end
32
- class_eval(&block)
50
+ instance_eval(&block)
33
51
 
34
52
  Dir["./#{@domain_folder}/*"].each {|file| load file }
35
53
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gameon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre33
4
+ version: 0.0.0.pre34
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy