Sha256: 825cc76a59338a8fd0cddfa06e5fe3ed21be75c9e51632cd914d6c87efc01e25

Contents?: true

Size: 464 Bytes

Versions: 30

Compression:

Stored size: 464 Bytes

Contents

module SugarCube
  module_function

  def look_in(where, here, here__deprecated={})
    return here[where] if here.has_key? where
    if here__deprecated[where]
      translated = here__deprecated[where]
      SugarCube.log("The symbol #{where.inspect} has been deprecated in favor of #{translated.inspect}")
      return here[translated]
    end
    raise SugarCubeNotFoundException.new(where.inspect)
  end

end

class SugarCubeNotFoundException < Exception
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
sugarcube-3.0.0 lib/all/sugarcube/look_in.rb
sugarcube-2.12.3 lib/all/sugarcube/look_in.rb
sugarcube-2.12.2 lib/all/sugarcube/look_in.rb
sugarcube-2.12.1 lib/all/sugarcube/look_in.rb
sugarcube-2.12.0 lib/all/sugarcube/look_in.rb
sugarcube-2.11.1 lib/all/sugarcube/look_in.rb
sugarcube-2.11.0 lib/all/sugarcube/look_in.rb
sugarcube-2.10.0 lib/all/sugarcube/look_in.rb
sugarcube-2.9.1 lib/all/sugarcube/look_in.rb
sugarcube-2.8.2 lib/all/sugarcube/look_in.rb
sugarcube-2.8.1 lib/all/sugarcube/look_in.rb
sugarcube-2.8.0 lib/all/sugarcube/look_in.rb
sugarcube-2.7.1 lib/all/sugarcube/look_in.rb
sugarcube-2.7.0 lib/all/sugarcube/look_in.rb
sugarcube-2.6.0 lib/all/sugarcube/look_in.rb
sugarcube-2.5.0 lib/all/sugarcube/look_in.rb
sugarcube-2.4.2 lib/all/sugarcube/look_in.rb
sugarcube-2.4.1 lib/all/sugarcube/look_in.rb
sugarcube-2.4.0 lib/all/sugarcube/look_in.rb
sugarcube-2.3.0 lib/all/sugarcube/look_in.rb