Module: ProviderKit::Buildable
- Included in:
- ProviderKit, ProviderAttribute
- Defined in:
- lib/provider_kit/buildable.rb
Overview
Designed to add provider utility methods to module
Instance Method Summary collapse
-
#with(key_or_record) ⇒ Object
ProviderKit.with(:stripe).subscriptions.get(id: "123").
Instance Method Details
#with(key_or_record) ⇒ Object
ProviderKit.with(:stripe).subscriptions.get(id: "123")
8 9 10 11 12 13 |
# File 'lib/provider_kit/buildable.rb', line 8 def with(key_or_record) provider = ProviderKit::Provider.new(key_or_record) return nil unless provider.present? provider.provider_instance end |