Method: CGRect#left

Defined in:
lib/geomotion/cg_rect.rb

#left(dist = nil, options = {}) ⇒ Object

modified rects



232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/geomotion/cg_rect.rb', line 232

def left(dist=nil, options={})
  if dist.nil?
    NSLog("Using the default value of `0` in `CGRect#left` is deprecated.")
    dist = 0
  end
  raise "You cannot specify `:left` in `CGRect#left`" if options.key?(:left)
  raise "You must specify an amount in `CGRect#left`" unless dist.is_a?(Numeric)

  self.apply({
    left: dist
    }).apply(options)
end