Module: Avm::Instances::Base::Production

Defined in:
lib/avm/instances/base/production.rb

Constant Summary collapse

DEFAULT_PRODUCTION =
true
PRODUCTION_KEY =
'production'

Instance Method Summary collapse

Instance Method Details

#default_production?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/avm/instances/base/production.rb', line 14

def default_production?
  DEFAULT_PRODUCTION
end

#production?Boolean

Returns:

  • (Boolean)


19
20
21
22
23
24
25
# File 'lib/avm/instances/base/production.rb', line 19

def production?
  if production_entry.found?
    production_entry.value.to_bool
  else
    default_production?
  end
end

#production_entryAvm::Entries::Entry

Returns:



28
29
30
# File 'lib/avm/instances/base/production.rb', line 28

def production_entry
  entry(PRODUCTION_KEY)
end