Class: Bpfql::Query::SelectOption
- Inherits:
-
Struct
- Object
- Struct
- Bpfql::Query::SelectOption
- Defined in:
- lib/bpfql/query.rb
Instance Attribute Summary collapse
-
#members ⇒ Object
Returns the value of attribute members.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(query) ⇒ SelectOption
constructor
A new instance of SelectOption.
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
#members ⇒ Object
Returns the value of attribute members
29 30 31 |
# File 'lib/bpfql/query.rb', line 29 def members @members end |
#type ⇒ Object
Returns the value of attribute type
29 30 31 |
# File 'lib/bpfql/query.rb', line 29 def type @type end |