Module: PlaidRails

Defined in:
lib/plaid_rails.rb,
lib/plaid_rails/event.rb,
lib/plaid_rails/engine.rb,
lib/plaid_rails/version.rb,
app/models/plaid_rails/account.rb,
app/models/plaid_rails/webhook.rb,
app/helpers/plaid_rails/application_helper.rb,
app/controllers/plaid_rails/link_controller.rb,
lib/generators/plaid_rails/install_generator.rb,
app/controllers/plaid_rails/accounts_controller.rb,
app/controllers/plaid_rails/webhooks_controller.rb,
app/services/plaid_rails/create_account_service.rb,
app/controllers/plaid_rails/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, Event Classes: Account, AccountsController, ApplicationController, CreateAccountService, Engine, InstallGenerator, LinkController, Webhook, WebhooksController

Constant Summary collapse

VERSION =
"0.1.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.customer_idObject

Returns the value of attribute customer_id.



8
9
10
# File 'lib/plaid_rails.rb', line 8

def customer_id
  @customer_id
end

.envObject

Returns the value of attribute env.



8
9
10
# File 'lib/plaid_rails.rb', line 8

def env
  @env
end

.environment_locationObject

Returns the value of attribute environment_location.



8
9
10
# File 'lib/plaid_rails.rb', line 8

def environment_location
  @environment_location
end

.long_tailObject

Returns the value of attribute long_tail.



8
9
10
# File 'lib/plaid_rails.rb', line 8

def long_tail
  @long_tail
end

.public_keyObject

Returns the value of attribute public_key.



8
9
10
# File 'lib/plaid_rails.rb', line 8

def public_key
  @public_key
end

.secretObject

Returns the value of attribute secret.



8
9
10
# File 'lib/plaid_rails.rb', line 8

def secret
  @secret
end

.webhookObject

Returns the value of attribute webhook.



8
9
10
# File 'lib/plaid_rails.rb', line 8

def webhook
  @webhook
end

Class Method Details

.all(callable = Proc.new) ⇒ Object



30
31
32
# File 'lib/plaid_rails.rb', line 30

def all(callable = Proc.new)
  PlaidRails::Event.all(callable)
end

.configure(&block) ⇒ Object

Raises:

  • (ArgumentError)


17
18
19
20
# File 'lib/plaid_rails.rb', line 17

def configure(&block)
  raise ArgumentError, "must provide a block" unless block_given?
  block.arity.zero? ? instance_eval(&block) : yield(self)
end

.instrument(name, object) ⇒ Object



26
27
28
# File 'lib/plaid_rails.rb', line 26

def instrument(name, object)
  PlaidRails::Event.backend.instrument( PlaidRails::Event.namespace.call(name), object)
end

.subscribe(name, callable = Proc.new) ⇒ Object



22
23
24
# File 'lib/plaid_rails.rb', line 22

def subscribe(name, callable = Proc.new)
  PlaidRails::Event.subscribe(name, callable)
end