Class: ThatLanguage::Client::Query

Inherits:
Object
  • Object
show all
Defined in:
lib/that_language/client/query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text:, client: Client.current) ⇒ Query

Returns a new instance of Query.



9
10
11
12
# File 'lib/that_language/client/query.rb', line 9

def initialize(text:, client: Client.current)
  @text = text
  @client = client
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



7
8
9
# File 'lib/that_language/client/query.rb', line 7

def text
  @text
end

Instance Method Details

#to_hObject



14
15
16
# File 'lib/that_language/client/query.rb', line 14

def to_h
  json
end