Class: Occson::Rails::ApplicationVersion
- Inherits:
-
Object
- Object
- Occson::Rails::ApplicationVersion
- Defined in:
- lib/occson/rails/application_version.rb
Constant Summary collapse
- UndefinedApplicationVersionError =
Class.new(StandardError)
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(application) ⇒ ApplicationVersion
constructor
A new instance of ApplicationVersion.
Constructor Details
#initialize(application) ⇒ ApplicationVersion
Returns a new instance of ApplicationVersion.
6 7 8 |
# File 'lib/occson/rails/application_version.rb', line 6 def initialize(application) @application = application end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 |
# File 'lib/occson/rails/application_version.rb', line 10 def call raise UndefinedApplicationVersionError, "Uninitialized constant #{const}" unless Object.const_defined?(const) Object.const_get(const) end |