Module: Kernel
- Defined in:
- lib/usage_credits.rb
Overview
Make DSL methods available at top level This is what enables the "bare" DSL syntax in initializers. Without it, users would have to write things like UsageCredits.credit_pack :starter do instead of credit_pack :starter do
Note: This modifies the global Kernel module, which is a powerful but invasive approach.
Instance Method Summary collapse
- #credit_pack(name, &block) ⇒ Object
- #operation(name, &block) ⇒ Object
- #subscription_plan(name, &block) ⇒ Object
Instance Method Details
#credit_pack(name, &block) ⇒ Object
180 181 182 |
# File 'lib/usage_credits.rb', line 180 def credit_pack(name, &block) UsageCredits.credit_pack(name, &block) end |
#operation(name, &block) ⇒ Object
176 177 178 |
# File 'lib/usage_credits.rb', line 176 def operation(name, &block) UsageCredits.operation(name, &block) end |
#subscription_plan(name, &block) ⇒ Object
184 185 186 |
# File 'lib/usage_credits.rb', line 184 def subscription_plan(name, &block) UsageCredits.subscription_plan(name, &block) end |