Module: PowerApi
- Extended by:
- PowerApi
- Included in:
- PowerApi
- Defined in:
- lib/power_api.rb,
lib/power_api/engine.rb,
lib/power_api/errors.rb,
lib/power_api/version.rb,
lib/power_api/generator_helpers.rb,
app/jobs/power_api/application_job.rb,
app/models/power_api/application_record.rb,
app/helpers/power_api/application_helper.rb,
app/mailers/power_api/application_mailer.rb,
app/controllers/power_api/base_controller.rb
Defined Under Namespace
Modules: ApplicationHelper, GeneratorHelper Classes: ApplicationJob, ApplicationMailer, ApplicationRecord, BaseController, ControllerGenerator, Engine, GeneratorError, GeneratorHelpers, InstallGenerator, InvalidVersion, VersionGenerator
Constant Summary collapse
- VERSION =
'1.0.0'
Instance Method Summary collapse
-
#setup {|_self| ... } ⇒ Object
You can add, in this module, your own configuration options as in the example below…
Instance Method Details
#setup {|_self| ... } ⇒ Object
You can add, in this module, your own configuration options as in the example below…
attr_writer :my_option
def my_option
return "Default Value" unless @my_option
@my_option
end
Then, you can customize the default behaviour (typically in a Rails initializer) like this:
PowerApi.setup do |config|
config.root_url = "Another value"
end
31 32 33 34 |
# File 'lib/power_api.rb', line 31 def setup yield self require "power_api" end |