Class: Occson::Rails::ApplicationVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/occson/rails/application_version.rb

Constant Summary collapse

UndefinedApplicationVersionError =
Class.new(StandardError)

Instance Method Summary collapse

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

#callObject



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