Module: Jackpot

Extended by:
Jackpot
Included in:
Jackpot
Defined in:
lib/jackpot.rb,
lib/jackpot/cron.rb,
lib/jackpot/engine.rb,
lib/jackpot/errors.rb,
lib/jackpot/factory.rb,
lib/jackpot/version.rb,
app/models/jackpot/card.rb,
app/models/jackpot/user.rb,
lib/jackpot/configuration.rb,
app/models/jackpot/gateway.rb,
app/models/jackpot/payment.rb,
app/models/jackpot/customer.rb,
app/models/jackpot/subscription.rb,
app/helpers/jackpot/customers_helper.rb,
app/helpers/jackpot/application_helper.rb,
app/helpers/jackpot/subscriptions_helper.rb,
app/controllers/jackpot/payments_controller.rb,
app/controllers/jackpot/customers_controller.rb,
app/controllers/jackpot/application_controller.rb,
app/controllers/jackpot/subscriptions_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, CustomersHelper, Errors, SubscriptionsHelper Classes: ApplicationController, Card, Configuration, Cron, Customer, CustomersController, Engine, Factory, Gateway, Payment, PaymentsController, Subscription, SubscriptionsController, User

Constant Summary collapse

Error =
Class.new(StandardError)
VERSION =
"0.0.3"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.table_name_prefixObject



3
4
5
# File 'app/models/jackpot/user.rb', line 3

def self.table_name_prefix
  'jackpot_'
end

Instance Method Details

#configurationObject



19
20
21
# File 'lib/jackpot.rb', line 19

def configuration
  @configuration ||= Configuration.new
end

#configure {|configuration| ... } ⇒ Object

Yields:



13
14
15
16
17
# File 'lib/jackpot.rb', line 13

def configure
  yield configuration
  factory = Jackpot::Factory.new(configuration.gateway)  
  Jackpot::Payment.gateway = factory.build 
end