Class: Bpfql::Query::SelectOption

Inherits:
Struct
  • Object
show all
Defined in:
lib/bpfql/query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query) ⇒ SelectOption

Returns a new instance of SelectOption.



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/bpfql/query.rb', line 30

def initialize(query)
  case query
  when String, Symbol
    if query.include? ','
      self.members = query.split(',').map{|v| v.strip }
    else
      self.members = [query]
    end
  when Array
    self.members = query
  end
end

Instance Attribute Details

#membersObject

Returns the value of attribute members

Returns:

  • (Object)

    the current value of members



29
30
31
# File 'lib/bpfql/query.rb', line 29

def members
  @members
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



29
30
31
# File 'lib/bpfql/query.rb', line 29

def type
  @type
end