Class: GraphQL::SmartSelect::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/smart_select/options.rb

Overview

Provide methods to expose keys for available options db_columns and smart_select

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(list_of_nodes, smart_select) ⇒ Options

Returns a new instance of Options.



12
13
14
15
# File 'lib/graphql/smart_select/options.rb', line 12

def initialize(list_of_nodes, smart_select)
  @list_of_nodes = list_of_nodes
  @smart_select = smart_select
end

Instance Attribute Details

#list_of_nodesObject (readonly)

Returns the value of attribute list_of_nodes.



10
11
12
# File 'lib/graphql/smart_select/options.rb', line 10

def list_of_nodes
  @list_of_nodes
end

#smart_selectObject (readonly)

Returns the value of attribute smart_select.



10
11
12
# File 'lib/graphql/smart_select/options.rb', line 10

def smart_select
  @smart_select
end

Instance Method Details

#exposeObject



17
18
19
# File 'lib/graphql/smart_select/options.rb', line 17

def expose
  db_columns_fields | smart_select_fields
end