Class: Haxe::Io::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/haxe/io/error.rb

Constant Summary collapse

ISENUM__ =
true
CONSTRUCTS__ =
["Blocked","Overflow","OutsideBounds","Custom"]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(t, index, p = nil) ⇒ Error

Returns a new instance of Error.



11
# File 'lib/lib/haxe/io/error.rb', line 11

def initialize(t,index,p = nil ) @tag = t; @index = index; @params = p; end

Instance Attribute Details

#indexObject

Returns the value of attribute index.



9
10
11
# File 'lib/lib/haxe/io/error.rb', line 9

def index
  @index
end

#paramsObject

Returns the value of attribute params.



10
11
12
# File 'lib/lib/haxe/io/error.rb', line 10

def params
  @params
end

#tagObject

Returns the value of attribute tag.



8
9
10
# File 'lib/lib/haxe/io/error.rb', line 8

def tag
  @tag
end

Class Method Details

.blockedObject



13
# File 'lib/lib/haxe/io/error.rb', line 13

def Error.blocked() Error.new("Blocked",0) end

.custom(e) ⇒ Object



14
# File 'lib/lib/haxe/io/error.rb', line 14

def Error.custom(e)  Error.new("Custom",3,[e]) end

.outside_boundsObject



15
# File 'lib/lib/haxe/io/error.rb', line 15

def Error.outside_bounds() Error.new("OutsideBounds",2) end

.overflowObject



16
# File 'lib/lib/haxe/io/error.rb', line 16

def Error.overflow() Error.new("Overflow",1) end

Instance Method Details

#==(a) ⇒ Object



18
# File 'lib/lib/haxe/io/error.rb', line 18

def ==(a) (!a.nil?) && (a.respond_to? 'ISENUM__') && a.tag === @tag && a.index === @index && a.params == @params end