Class: RubyJisho::Search
- Inherits:
-
Object
- Object
- RubyJisho::Search
- Defined in:
- lib/ruby_jisho/search.rb
Overview
Queries the Jisho API and returns a Results object
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
-
#initialize(query) ⇒ Search
constructor
A new instance of Search.
- #results ⇒ Object
Constructor Details
#initialize(query) ⇒ Search
Returns a new instance of Search.
8 9 10 |
# File 'lib/ruby_jisho/search.rb', line 8 def initialize(query) @query = query end |
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
6 7 8 |
# File 'lib/ruby_jisho/search.rb', line 6 def query @query end |
Instance Method Details
#results ⇒ Object
12 13 14 |
# File 'lib/ruby_jisho/search.rb', line 12 def results @results ||= Results.new(json_response) end |