Class: Babeltrace2::BTFieldClass::Variant::WithSelectorField::IntegerUnsigned::Option

Inherits:
Babeltrace2::BTFieldClassVariantOption
  • Object
show all
Defined in:
lib/babeltrace2/trace-ir/field-class.rb

Instance Method Summary collapse

Instance Method Details

#get_rangesObject Also known as: ranges



1564
1565
1566
1567
1568
# File 'lib/babeltrace2/trace-ir/field-class.rb', line 1564

def get_ranges
   BTIntegerRangeSetUnsigned.new(
     Babeltrace2.bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const(
       @handle), retain: true)
end

#to_hObject



1571
1572
1573
1574
1575
# File 'lib/babeltrace2/trace-ir/field-class.rb', line 1571

def to_h
  res = super
  res[:ranges] = ranges.each.collect { |r| [r.lower, r.upper] }
  res
end