Module: Prelaunch

Defined in:
lib/prelaunch.rb,
lib/prelaunch/engine.rb,
lib/prelaunch/helpers.rb,
lib/prelaunch/version.rb,
lib/prelaunch/constraint.rb,
lib/generators/prelaunch/view_generator.rb,
lib/generators/prelaunch/prelaunch_generator.rb,
app/controllers/prelaunch/prelaunch_controller.rb

Defined Under Namespace

Modules: Generators, Helpers Classes: Constraint, Engine, PrelaunchController

Constant Summary collapse

VERSION =
'0.0.5'
@@path =
'prelaunch'
@@token =
'letmein'
@@redirect_url =
nil
@@environments =
['production']

Class Method Summary collapse

Class Method Details

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Prelaunch)

    the object that the method was called on



33
34
35
# File 'lib/prelaunch.rb', line 33

def self.setup
  yield self
end

.valid?(token) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
22
23
24
25
26
27
# File 'lib/prelaunch.rb', line 19

def self.valid? token
  if @@token.is_a? Proc
    @@token.call token
  elsif @@token.is_a? Array
    @@token.include? token
  else
    @@token == token
  end
end

.valid_env?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/prelaunch.rb', line 29

def self.valid_env?
  @@environments.include? Rails.env
end