Class: SerpCheap::RelatedSearch
- Inherits:
-
Object
- Object
- SerpCheap::RelatedSearch
- Defined in:
- lib/serpcheap/models.rb
Instance Attribute Summary collapse
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(query:, link:) ⇒ RelatedSearch
constructor
A new instance of RelatedSearch.
Constructor Details
#initialize(query:, link:) ⇒ RelatedSearch
Returns a new instance of RelatedSearch.
80 81 82 83 |
# File 'lib/serpcheap/models.rb', line 80 def initialize(query:, link:) @query = query @link = link end |
Instance Attribute Details
#link ⇒ Object (readonly)
Returns the value of attribute link.
78 79 80 |
# File 'lib/serpcheap/models.rb', line 78 def link @link end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
78 79 80 |
# File 'lib/serpcheap/models.rb', line 78 def query @query end |
Class Method Details
.from_hash(d) ⇒ Object
85 86 87 |
# File 'lib/serpcheap/models.rb', line 85 def self.from_hash(d) new(query: d["query"].to_s, link: d["link"].to_s) end |