Class: IDL::Type::Boolean
Constant Summary
collapse
- Range =
[true, false]
Constants inherited
from IDL::Type
Long, LongLong, Octet, Short, TinyShort, ULong, ULongLong, UShort, UTinyShort
Instance Method Summary
collapse
Methods inherited from IDL::Type
#instantiate, #is_anonymous?, #is_complete?, #is_local?, #is_node?, #is_template?, #matches?, #resolved_node, #resolved_type, #typeerror, #typename
Instance Method Details
223
224
225
|
# File 'lib/ridl/type.rb', line 223
def default
false
end
|
#in_range?(val) ⇒ Boolean
219
220
221
|
# File 'lib/ridl/type.rb', line 219
def in_range?(val)
Range.include?(val)
end
|
215
216
217
|
# File 'lib/ridl/type.rb', line 215
def max
true
end
|
211
212
213
|
# File 'lib/ridl/type.rb', line 211
def min
false
end
|
#narrow(obj) ⇒ Object
202
203
204
205
|
# File 'lib/ridl/type.rb', line 202
def narrow(obj)
typeerror(obj) unless [TrueClass, FalseClass].include? obj.class
obj
end
|
#next(val) ⇒ Object
227
228
229
|
# File 'lib/ridl/type.rb', line 227
def next(val)
!val
end
|
#range_length ⇒ Object
207
208
209
|
# File 'lib/ridl/type.rb', line 207
def range_length
2
end
|