Class: SerpCheap::ScrapeStats
- Inherits:
-
Object
- Object
- SerpCheap::ScrapeStats
- Defined in:
- lib/serpcheap/models.rb
Instance Attribute Summary collapse
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
-
#cost ⇒ Object
readonly
Returns the value of attribute cost.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(balance:, cost:) ⇒ ScrapeStats
constructor
A new instance of ScrapeStats.
Constructor Details
#initialize(balance:, cost:) ⇒ ScrapeStats
Returns a new instance of ScrapeStats.
162 163 164 165 |
# File 'lib/serpcheap/models.rb', line 162 def initialize(balance:, cost:) @balance = balance @cost = cost end |
Instance Attribute Details
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
160 161 162 |
# File 'lib/serpcheap/models.rb', line 160 def balance @balance end |
#cost ⇒ Object (readonly)
Returns the value of attribute cost.
160 161 162 |
# File 'lib/serpcheap/models.rb', line 160 def cost @cost end |
Class Method Details
.from_hash(d) ⇒ Object
167 168 169 |
# File 'lib/serpcheap/models.rb', line 167 def self.from_hash(d) new(balance: d["balance"].to_i, cost: d["cost"].to_i) end |