Sha256: 3ea21104eaf078c600088c233a9062347f645eead302d6a4f037c19596d3397f

Contents?: true

Size: 420 Bytes

Versions: 14

Compression:

Stored size: 420 Bytes

Contents

class NSError

  def self.new(message='Error', options={})
    domain = options[:domain] || 'Error'
    code = options[:code] || 0
    info = { NSLocalizedDescriptionKey => message }
    if options[:userInfo]
      info.merge! options[:userInfo]
    end
    NSError.alloc.initWithDomain( domain,
                            code: code,
                        userInfo: info
                                )
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
sugarcube-2.4.2 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.4.1 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.4.0 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.3.0 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.2.0 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.1.5 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.1.4 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.1.3 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.1.2 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.1.1 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.1.0 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.0.2 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.0.1 lib/ios/sugarcube-factories/nserror.rb
sugarcube-2.0.0 lib/ios/sugarcube-factories/nserror.rb