class SeedPacket::Environment

Attributes

environment[RW]

Public Class Methods

new(environment) click to toggle source
# File lib/seed_packet/environment.rb, line 7
def initialize(environment)
  self.environment = environment.to_s
end

Public Instance Methods

samples_allowed?() click to toggle source
# File lib/seed_packet/environment.rb, line 15
def samples_allowed?
  %w{production test}.exclude?(environment)
end
scrubbing_allowed?() click to toggle source
# File lib/seed_packet/environment.rb, line 19
def scrubbing_allowed?
  %w{development test}.include?(environment)
end
seeding_allowed?() click to toggle source
# File lib/seed_packet/environment.rb, line 11
def seeding_allowed?
  environment != 'test'
end