Class: XlsFunction::ErrorValue

Inherits:
String
  • Object
show all
Defined in:
lib/xls_function/error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string = '', error_info = '') ⇒ ErrorValue

Returns a new instance of ErrorValue.



9
10
11
12
# File 'lib/xls_function/error.rb', line 9

def initialize(string = '', error_info = '')
  @error_info = error_info
  super(string)
end

Instance Attribute Details

#error_infoObject (readonly)

Returns the value of attribute error_info.



7
8
9
# File 'lib/xls_function/error.rb', line 7

def error_info
  @error_info
end

Class Method Details

.div0!(error_info = '') ⇒ Object

Returns #DIV/0!.

Returns:

  • #DIV/0!



39
40
41
# File 'lib/xls_function/error.rb', line 39

def div0!(error_info = '')
  new(ERROR_DIV0, error_info)
end

.na(error_info = '') ⇒ Object

Returns #N/A.

Returns:

  • #N/A



34
35
36
# File 'lib/xls_function/error.rb', line 34

def na(error_info = '')
  new(ERROR_NA, error_info)
end

.num!(error_info = '') ⇒ Object

Returns #NUM!.

Returns:

  • #NUM!



29
30
31
# File 'lib/xls_function/error.rb', line 29

def num!(error_info = '')
  new(ERROR_NUM, error_info)
end

.value!(error_info = '') ⇒ Object

Returns #VALUE!.

Returns:

  • #VALUE!



24
25
26
# File 'lib/xls_function/error.rb', line 24

def value!(error_info = '')
  new(ERROR_VALUE, error_info)
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/xls_function/error.rb', line 18

def error?
  true
end

#to_sObject



14
15
16
# File 'lib/xls_function/error.rb', line 14

def to_s
  super + error_info
end