Module: SugarCube

Defined in:
lib/sugarcube/adjust.rb,
lib/sugarcube/look_in.rb,
lib/sugarcube/version.rb,
lib/sugarcube-legacy/log.rb,
lib/sugarcube-osx/adjust.rb,
lib/sugarcube-modal/modal.rb,
lib/sugarcube-timer/timer.rb,
lib/sugarcube-events/uicontrol.rb,
lib/sugarcube-nsdate/date_parser.rb,
lib/sugarcube-anonymous/anonymous.rb,
lib/sugarcube-factories/uialertview.rb,
lib/sugarcube-factories/uiactionsheet.rb,
lib/sugarcube-animations/animation_chain.rb,
lib/sugarcube-coregraphics/core_graphics.rb

Defined Under Namespace

Modules: Adjust, CoreGraphics, DateParser, Legacy, Modal, Timer Classes: ActionSheetDelegate, AlertViewDelegate, AnimationChain, Anonymous, UIControlCallbackHelper

Constant Summary collapse

Version =
'1.3.11'

Class Method Summary collapse

Class Method Details

.look_in(where, here, here__deprecated = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/sugarcube/look_in.rb', line 4

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