Sha256: f732dc3306b3146b4b986927a8f05bba648a15a4606e2a4fc7e358d4fd34d72b

Contents?: true

Size: 418 Bytes

Versions: 105

Compression:

Stored size: 418 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

105 entries across 105 versions & 1 rubygems

Version Path
sugarcube-1.7.0 lib/sugarcube-factories/nserror.rb
sugarcube-1.6.3 lib/sugarcube-factories/nserror.rb
sugarcube-1.6.2 lib/sugarcube-factories/nserror.rb
sugarcube-1.6.1 lib/sugarcube-factories/nserror.rb
sugarcube-1.6.0 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.9 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.8 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.7 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.6 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.5 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.4 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.3 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.2 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.1 lib/sugarcube-factories/nserror.rb
sugarcube-1.5.0 lib/sugarcube-factories/nserror.rb
sugarcube-1.4.6 lib/sugarcube-factories/nserror.rb
sugarcube-1.4.5 lib/sugarcube-factories/nserror.rb
sugarcube-1.4.4 lib/sugarcube-factories/nserror.rb
sugarcube-1.4.3 lib/sugarcube-factories/nserror.rb
sugarcube-1.4.2 lib/sugarcube-factories/nserror.rb