Sha256: 631023d5500064c57a3f86966287600749e22f3d8777f999a7d99ddc7e816b8c

Contents?: true

Size: 312 Bytes

Versions: 3

Compression:

Stored size: 312 Bytes

Contents

module Crystal
  class Conveyors
    
    def initialize
      @hash = {}
    end
    
    def [] conveyor_name
      @hash[conveyor_name.to_s] ||= Crystal::Conveyor.new
    end
    
    def method_missing m, &block
      if block
        block.call self[m]
      else
        self[m]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
crystal-0.0.13 lib/crystal/conveyor/conveyors.rb
crystal-0.0.12 lib/crystal/conveyor/conveyors.rb
crystal_ext-0.0.11 lib/crystal/conveyor/conveyors.rb