Class: Oso::Polar::UserType
- Inherits:
 - 
      Object
      
        
- Object
 - Oso::Polar::UserType
 
 
- Defined in:
 - lib/oso/polar/host.rb
 
Overview
For holding type metadata: name, fields, etc.
Instance Attribute Summary collapse
- 
  
    
      #build_query  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute build_query.
 - 
  
    
      #combine_query  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute combine_query.
 - 
  
    
      #exec_query  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute exec_query.
 - 
  
    
      #fields  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute fields.
 - 
  
    
      #id  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute id.
 - 
  
    
      #klass  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute klass.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 
Instance Method Summary collapse
- 
  
    
      #initialize(name:, klass:, id:, fields:, build_query:, combine_query:, exec_query:)  ⇒ UserType 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
rubocop:disable Metrics/ParameterLists.
 
Constructor Details
#initialize(name:, klass:, id:, fields:, build_query:, combine_query:, exec_query:) ⇒ UserType
rubocop:disable Metrics/ParameterLists
      43 44 45 46 47 48 49 50 51 52  | 
    
      # File 'lib/oso/polar/host.rb', line 43 def initialize(name:, klass:, id:, fields:, build_query:, combine_query:, exec_query:) # rubocop:disable Metrics/ParameterLists @name = name @klass = klass @id = id # accept symbol keys @fields = fields.each_with_object({}) { |kv, o| o[kv[0].to_s] = kv[1] } @build_query = build_query @combine_query = combine_query @exec_query = exec_query end  | 
  
Instance Attribute Details
#build_query ⇒ Object (readonly)
Returns the value of attribute build_query.
      41 42 43  | 
    
      # File 'lib/oso/polar/host.rb', line 41 def build_query @build_query end  | 
  
#combine_query ⇒ Object (readonly)
Returns the value of attribute combine_query.
      41 42 43  | 
    
      # File 'lib/oso/polar/host.rb', line 41 def combine_query @combine_query end  | 
  
#exec_query ⇒ Object (readonly)
Returns the value of attribute exec_query.
      41 42 43  | 
    
      # File 'lib/oso/polar/host.rb', line 41 def exec_query @exec_query end  | 
  
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
      41 42 43  | 
    
      # File 'lib/oso/polar/host.rb', line 41 def fields @fields end  | 
  
#id ⇒ Object (readonly)
Returns the value of attribute id.
      41 42 43  | 
    
      # File 'lib/oso/polar/host.rb', line 41 def id @id end  | 
  
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
      41 42 43  | 
    
      # File 'lib/oso/polar/host.rb', line 41 def klass @klass end  | 
  
#name ⇒ Object (readonly)
Returns the value of attribute name.
      41 42 43  | 
    
      # File 'lib/oso/polar/host.rb', line 41 def name @name end  |