mushin 0.0.0.pre84 → 0.0.0.pre85

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/mushin/base.rb +14 -14
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7381d7cd4ccc8adb1833aabda1a7d9c825e6eac7
4
- data.tar.gz: 4b4f42c6309fc1d03716f4d684c70d42d61f392e
3
+ metadata.gz: fe6306aa9ad29f40e04d0ad033659574ab87be17
4
+ data.tar.gz: be8a597ba33413b7e8d8c9eebf5692e163706bf6
5
5
  SHA512:
6
- metadata.gz: ed9b38510ef3cbfc86a99611669302b959de492b2e796a4e313f23c37552400b26caf50b5a52e71bb04cd8a91e2366949fb0853cf60bec23dbe4c0ed237c9263
7
- data.tar.gz: caffaffbd288de26c4bf998aa4749d0e24ea92445ee994cd946a2e28f18e4e563ef4243ea36b36211e15c7fc26ed8fd147ee72e98e027db024dd867c637207b1
6
+ metadata.gz: c1ee4356b6fc5548b49d14783950acefa7dbab276abb0e5c65c6c85499855aa195cd74969bff525acfd16f2145f9e94b42d9eb29a986d542910a2be248c59ac5
7
+ data.tar.gz: 7b04b1d22f8f5b7a4db914c21d1ce9dbb03da9fc003e325a464be81ec69d4f8b64c0874d68aa0dfc6da940d23dd7d3ab996e171dd6653d766ec75d2c52367143
data/lib/mushin/base.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Mushin # Domain Frameworks Generator
2
2
  module Errors
3
- exceptions = %w[ UnkownDSLConstruct UnkownActivation UnknownOption ]
3
+ exceptions = %w[ UnkownDSLConstruct UnkownUse UnknownOption ]
4
4
  exceptions.each { |e| const_set(e, Class.new(StandardError)) }
5
5
  end
6
6
 
@@ -48,20 +48,20 @@ module Mushin # Domain Frameworks Generator
48
48
 
49
49
  module DSL
50
50
  class Context
51
- attr_accessor :title, :statments
51
+ attr_accessor :title, :activities
52
52
  def initialize title
53
53
  @title = title
54
- @statments = []
54
+ @activities = []
55
55
  end
56
56
  end
57
- class Statment
58
- attr_accessor :title, :activations
57
+ class Activity
58
+ attr_accessor :title, :uses
59
59
  def initialize title
60
60
  @title = title
61
- @activations = []
61
+ @uses = []
62
62
  end
63
63
  end
64
- class Activation
64
+ class Use
65
65
  attr_accessor :name, :opts, :params
66
66
  def initialize name, opts={}, params={}
67
67
  @name = name
@@ -76,16 +76,16 @@ module Mushin # Domain Frameworks Generator
76
76
  Mushin::DSL.contexts = []
77
77
  def context title, &block
78
78
  @context = Mushin::DSL::Context.new title
79
- def statment statment=[], &block
80
- @statment = Mushin::DSL::Statment.new statment
81
- def activation name, opts={}, params={}
82
- if !@statment.activations.bsearch {|x| x == [name,opts,params]}
83
- @activation = Mushin::DSL::Activation.new name, opts, params
84
- @statment.activations << @activation
79
+ def activity activity=[], &block
80
+ @activity = Mushin::DSL::Activity.new activity
81
+ def use name, opts={}, params={}
82
+ if !@activity.uses.bsearch {|x| x == [name,opts,params]}
83
+ @use = Mushin::DSL::Use.new name, opts, params
84
+ @activity.uses << @use
85
85
  end
86
86
  end
87
87
  yield
88
- @context.statments << @statment
88
+ @context.activities << @activity
89
89
  end
90
90
  yield
91
91
  Mushin::DSL.contexts << @context
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mushin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre84
4
+ version: 0.0.0.pre85
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy