Class: ICU::Calendar::Library::ErrorCode
- Inherits:
-
FFI::MemoryPointer
- Object
- FFI::MemoryPointer
- ICU::Calendar::Library::ErrorCode
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/icu/calendar/library/error_code.rb
Class Method Summary collapse
Instance Method Summary collapse
- #buffer_overflow? ⇒ Boolean
- #failure? ⇒ Boolean
-
#initialize ⇒ ErrorCode
constructor
A new instance of ErrorCode.
- #success? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ ErrorCode
Returns a new instance of ErrorCode.
10 11 12 |
# File 'lib/icu/calendar/library/error_code.rb', line 10 def initialize super(:int) end |
Class Method Details
.native_type ⇒ Object
6 7 8 |
# File 'lib/icu/calendar/library/error_code.rb', line 6 def self.native_type FFI::Type::POINTER end |
Instance Method Details
#buffer_overflow? ⇒ Boolean
14 15 16 |
# File 'lib/icu/calendar/library/error_code.rb', line 14 def buffer_overflow? to_i == U_BUFFER_OVERFLOW_ERROR end |
#failure? ⇒ Boolean
18 19 20 |
# File 'lib/icu/calendar/library/error_code.rb', line 18 def failure? to_i > U_ZERO_ERROR end |
#success? ⇒ Boolean
22 23 24 |
# File 'lib/icu/calendar/library/error_code.rb', line 22 def success? to_i <= U_ZERO_ERROR end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/icu/calendar/library/error_code.rb', line 28 def to_s Library.u_errorName(to_i) end |