Class: Babeltrace2Gen::BTFieldClass::Variant::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/metababel/bt2_trace_class_generator.rb

Direct Known Subclasses

WithSelectorField::Option

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent:, name:, field_class:) ⇒ Option

Returns a new instance of Option.



929
930
931
932
933
# File 'lib/metababel/bt2_trace_class_generator.rb', line 929

def initialize(parent:, name:, field_class:)
  @parent = parent
  @name = name
  @field_class = BTFieldClass.from_h(self, field_class)
end

Instance Attribute Details

#field_classObject (readonly)

Returns the value of attribute field_class.



927
928
929
# File 'lib/metababel/bt2_trace_class_generator.rb', line 927

def field_class
  @field_class
end

#nameObject (readonly)

Returns the value of attribute name.



927
928
929
# File 'lib/metababel/bt2_trace_class_generator.rb', line 927

def name
  @name
end