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-2.2.0 lib/all/sugarcube/look_in.rb
sugarcube-2.1.5 lib/all/sugarcube/look_in.rb
sugarcube-2.1.4 lib/all/sugarcube/look_in.rb
sugarcube-2.1.3 lib/all/sugarcube/look_in.rb
sugarcube-2.1.2 lib/all/sugarcube/look_in.rb
sugarcube-2.1.1 lib/all/sugarcube/look_in.rb
sugarcube-2.1.0 lib/all/sugarcube/look_in.rb
sugarcube-2.0.2 lib/all/sugarcube/look_in.rb
sugarcube-2.0.1 lib/all/sugarcube/look_in.rb
sugarcube-2.0.0 lib/all/sugarcube/look_in.rb