y_petri 2.2.3 → 2.2.4

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: 4d21a38d5b195eb6616e741ee032954f2e3c8a5f
4
- data.tar.gz: fe9679678f401d6842e9eecec61742a44e480882
3
+ metadata.gz: 9fee764f4263722567acef71d06105293254a2d1
4
+ data.tar.gz: f852ca2e666b5d6cccf19ba82d10087f32bc1535
5
5
  SHA512:
6
- metadata.gz: 4329188c403e5c4491f0b716736ab70ff3094f49cc34c950713c9f881e233c52f853e5776bae401ddd5236e6cbcf03ab1b61d31616daf98a33d4233f3f1be2ee
7
- data.tar.gz: b059ae5693243f584706b30457b0a9a2d593faa700f5f63ac30f5a5a68164e9041a8a82289338f1b54a3637586a3e8507def9f1d524863b4d5c9b7dab7890800
6
+ metadata.gz: 6f0306ce895efb751c75635b9366fe227183f438ed5c20613f727197db5c862b5029387a430a1f30f8829d4b272136cd6800458e61fb3060b3e8f4a042268926
7
+ data.tar.gz: 388a31f3d3fd44b4cb04a6727812cddf5c99738349ef0c7323d9f1a8ca0949243e11990670670e08511a2b94141f3ced23310051e92ae4e62f3cf5b821a83c8d
@@ -7,7 +7,7 @@ module YPetri
7
7
 
8
8
  Place = Class.new
9
9
  Transition = Class.new
10
- Net = Class.new
10
+ Net = Class.new Module
11
11
  Simulation = Class.new
12
12
  Core = Class.new
13
13
  World = Class.new
@@ -76,12 +76,12 @@ class YPetri::Net::DataSet < Hash
76
76
 
77
77
  # Recreates the simulation at a given event label.
78
78
  #
79
- def reconstruct event: (fail "No event given!"), **settings
79
+ def reconstruct at: (fail "No event given!"), **settings
80
80
  # settings may include marking clamps, marking, inital marking...
81
- rec = interpolate( event )
81
+ rec = interpolate( at )
82
82
  settings = settings().merge settings if settings()
83
83
  if timed? then
84
- rec.reconstruct time: event, **settings
84
+ rec.reconstruct time: at, **settings
85
85
  else
86
86
  rec.reconstruct **settings
87
87
  end
@@ -161,7 +161,7 @@ class YPetri::Net::DataSet < Hash
161
161
  if absent_features.empty? then # it is a subset
162
162
  line = reduced_features.map { |feature| record.fetch feature }
163
163
  else # it will require simulation reconstruction
164
- sim = reconstruct event: event
164
+ sim = reconstruct at: event
165
165
  if absent_features.any? { |f| f.timed? rescue false } then
166
166
  fail ArgumentError, "Reconstruction of timed features requires " +
167
167
  "the named arg :delta_time to be given!" unless Δt
data/lib/y_petri/net.rb CHANGED
@@ -26,8 +26,6 @@ class YPetri::Net
26
26
  def of elements
27
27
  new.tap { |inst| elements.each { |e| inst << e } }
28
28
  end
29
-
30
- private :new
31
29
  end
32
30
 
33
31
  delegate :world, to: "self.class"
@@ -1,4 +1,4 @@
1
1
  module YPetri
2
- VERSION = "2.2.3"
2
+ VERSION = "2.2.4"
3
3
  DEBUG = false
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: y_petri
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - boris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-21 00:00:00.000000000 Z
11
+ date: 2013-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: y_support