Class: SerpCheap::RankStats
- Inherits:
-
Object
- Object
- SerpCheap::RankStats
- 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.
-
#pages_cached ⇒ Object
readonly
Returns the value of attribute pages_cached.
-
#pages_fresh ⇒ Object
readonly
Returns the value of attribute pages_fresh.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(balance:, cost:, pages_cached:, pages_fresh:) ⇒ RankStats
constructor
A new instance of RankStats.
Constructor Details
#initialize(balance:, cost:, pages_cached:, pages_fresh:) ⇒ RankStats
Returns a new instance of RankStats.
223 224 225 226 227 228 |
# File 'lib/serpcheap/models.rb', line 223 def initialize(balance:, cost:, pages_cached:, pages_fresh:) @balance = balance @cost = cost @pages_cached = pages_cached @pages_fresh = pages_fresh end |
Instance Attribute Details
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
221 222 223 |
# File 'lib/serpcheap/models.rb', line 221 def balance @balance end |
#cost ⇒ Object (readonly)
Returns the value of attribute cost.
221 222 223 |
# File 'lib/serpcheap/models.rb', line 221 def cost @cost end |
#pages_cached ⇒ Object (readonly)
Returns the value of attribute pages_cached.
221 222 223 |
# File 'lib/serpcheap/models.rb', line 221 def pages_cached @pages_cached end |
#pages_fresh ⇒ Object (readonly)
Returns the value of attribute pages_fresh.
221 222 223 |
# File 'lib/serpcheap/models.rb', line 221 def pages_fresh @pages_fresh end |
Class Method Details
.from_hash(d) ⇒ Object
230 231 232 233 234 235 236 237 |
# File 'lib/serpcheap/models.rb', line 230 def self.from_hash(d) new( balance: d["balance"].to_i, cost: d["cost"].to_i, pages_cached: d["pages_cached"].to_i, pages_fresh: d["pages_fresh"].to_i ) end |