class Peek::Views::AppVersion
AppVersion
view
Public Class Methods
new(options = {})
click to toggle source
Setting up the peek views Accepted keys in options:
-
app_name: Name of your Rails application (default: Rails)
# File lib/peek/views/app_version.rb, line 8 def initialize(options = {}) @app_name = options.delete(:app_name) || Rails end
Public Instance Methods
app_version()
click to toggle source
Return the application version number is set Else, build it from the git tag
# File lib/peek/views/app_version.rb, line 14 def app_version @app_version ||= (@app_name::VERSION || `git describe --tags`.strip) end