Sha256: 6c7b3c919b98ba15304cb38a0d1847957f18efabdc9a09f413a85b6c1bb3bf42

Contents?: true

Size: 664 Bytes

Versions: 39

Compression:

Stored size: 664 Bytes

Contents

#encoding: utf-8

# A mixin with place type selectors.
# 
class YPetri::Simulation
  class Places < Elements
    module Types
      # Subset of free places, if any.
      # 
      def free
        ( @Type_free ||= Class.new( self.class ).tap do |klass|
            klass.class_exec { include Type_free }
          end ).load subset( &:free? )
      end

      # Subset of clamped places, if any.
      # 
      def clamped
        ( @Type_clamped ||= Class.new( self.class ).tap do |klass|
            klass.class_exec { include Type_clamped }
          end ).load subset( &:clamped? )
      end
    end # Types
  end # class Places
end # class YPetri::Simulation

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
y_petri-2.2.4 lib/y_petri/simulation/places/types.rb
y_petri-2.2.3 lib/y_petri/simulation/places/types.rb
y_petri-2.2.2 lib/y_petri/simulation/places/types.rb
y_petri-2.2.1 lib/y_petri/simulation/places/types.rb
y_petri-2.2.0 lib/y_petri/simulation/places/types.rb
y_petri-2.1.51 lib/y_petri/simulation/places/types.rb
y_petri-2.1.50 lib/y_petri/simulation/places/types.rb
y_petri-2.1.49 lib/y_petri/simulation/places/types.rb
y_petri-2.1.48 lib/y_petri/simulation/places/types.rb
y_petri-2.1.47 lib/y_petri/simulation/places/types.rb
y_petri-2.1.46 lib/y_petri/simulation/places/types.rb
y_petri-2.1.45 lib/y_petri/simulation/places/types.rb
y_petri-2.1.44 lib/y_petri/simulation/places/types.rb
y_petri-2.1.42 lib/y_petri/simulation/places/types.rb
y_petri-2.1.40 lib/y_petri/simulation/places/types.rb
y_petri-2.1.39 lib/y_petri/simulation/places/types.rb
y_petri-2.1.37 lib/y_petri/simulation/places/types.rb
y_petri-2.1.36 lib/y_petri/simulation/places/types.rb
y_petri-2.1.35 lib/y_petri/simulation/places/types.rb
y_petri-2.1.34 lib/y_petri/simulation/places/types.rb