Class: RooOnRails::Checks::EnvSpecific

Inherits:
Base
  • Object
show all
Defined in:
lib/roo_on_rails/checks/env_specific.rb

Overview

Base class for checks that are applicable per-environment. The ‘env` passed to the initializer becomes part of the check signature.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

requires, #run

Methods included from Helpers

#bold, included

Constructor Details

#initialize(**options) ⇒ EnvSpecific

Returns a new instance of EnvSpecific.



10
11
12
13
# File 'lib/roo_on_rails/checks/env_specific.rb', line 10

def initialize(**options)
  super(options)
  @env = @options[:env]
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



8
9
10
# File 'lib/roo_on_rails/checks/env_specific.rb', line 8

def env
  @env
end

Instance Method Details

#signatureObject



15
16
17
# File 'lib/roo_on_rails/checks/env_specific.rb', line 15

def signature
  super + [@env]
end