Class: ExoLogging::ProviderRequest
- Inherits:
-
Object
- Object
- ExoLogging::ProviderRequest
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/exologging/provider_request.rb
Constant Summary collapse
- @@app_name =
'Untitled'
Class Method Summary collapse
Class Method Details
.between(from, to) ⇒ Object
19 20 21 22 23 |
# File 'lib/exologging/provider_request.rb', line 19 def self.between(from, to) ProviderRequest.where(name: @@app_name, :created_at.gte => from, :created_at.lte => to) end |
.mk!(provider, cost) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/exologging/provider_request.rb', line 25 def self.mk!(provider, cost) x = ProviderRequest.new x.name = @@app_name x.provider = provider x.cost = cost.to_f x.save! x end |
.set_app_name(appname) ⇒ Object
15 16 17 |
# File 'lib/exologging/provider_request.rb', line 15 def self.set_app_name(appname) @@app_name = appname end |