lib/y_petri/net/state.rb in y_petri-2.3.3 vs lib/y_petri/net/state.rb in y_petri-2.3.4

- old
+ new

@@ -18,11 +18,11 @@ with: { State: รง } ) end end # Returns the feature identified by the argument. - # + # def Feature arg=nil, **named_args case arg when Feature() then arg when Feature then arg.class.new( arg ) when nil then @@ -60,13 +60,15 @@ # @Feature, @Features = Feature, Features delegate :net, :Feature, # Note that as syntactic salt, specific methods - :Features, # #marking, #firing, #gradient, #flux etc. are - :features, # not delegated to self.class. + :Features, # #firing, #gradient, #flux etc. are not + :features, # delegated to self.class. to: "self.class" + # FIXME: #features method above actually doesn't work in practice, self.class + # doesn't have it. # Given a set of clamped places, this method outputs a +Record+ instance # containing the marking of the free places (complementary to the supplied # set of clamped places). I no set of clamped places is supplied, it is # considered empty. @@ -75,11 +77,11 @@ free_places = case clamped_places when Hash then to_record( clamped_places.keys ) else places - places( clamped_places ) end - features( marking: free_places ).Record.load markings( free_places ) - end + features( marking: free_places ).Record.load markings( free_places ) + end # FIXME: I find it not working atm. # Marking of a single given place in this state. # def marking place self[ net.places.index net.place( place ) ]