Class: Amazon::SDB::Usage
- Inherits:
-
Object
- Object
- Amazon::SDB::Usage
- Defined in:
- lib/amazon_sdb/usage.rb
Overview
A class for accumulating usage data returned from Amazon requests. Returned by Base#usage
Instance Attribute Summary collapse
-
#box_usage ⇒ Object
readonly
Returns the value of attribute box_usage.
Instance Method Summary collapse
- #<<(value) ⇒ Object
- #add_usage(value) ⇒ Object
-
#initialize ⇒ Usage
constructor
A new instance of Usage.
- #reset! ⇒ Object
Constructor Details
#initialize ⇒ Usage
Returns a new instance of Usage.
8 9 10 |
# File 'lib/amazon_sdb/usage.rb', line 8 def initialize reset! end |
Instance Attribute Details
#box_usage ⇒ Object (readonly)
Returns the value of attribute box_usage.
6 7 8 |
# File 'lib/amazon_sdb/usage.rb', line 6 def box_usage @box_usage end |
Instance Method Details
#<<(value) ⇒ Object
20 21 22 |
# File 'lib/amazon_sdb/usage.rb', line 20 def <<(value) @box_usage += value end |
#add_usage(value) ⇒ Object
12 13 14 |
# File 'lib/amazon_sdb/usage.rb', line 12 def add_usage(value) @box_usage += value end |
#reset! ⇒ Object
16 17 18 |
# File 'lib/amazon_sdb/usage.rb', line 16 def reset! @box_usage = 0.0 end |