Class: Ksef::Environments::Environment

Inherits:
Data
  • Object
show all
Defined in:
lib/ksef/environments.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_urlObject (readonly)

Returns the value of attribute base_url

Returns:

  • (Object)

    the current value of base_url



16
17
18
# File 'lib/ksef/environments.rb', line 16

def base_url
  @base_url
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



16
17
18
# File 'lib/ksef/environments.rb', line 16

def name
  @name
end

#supports_test_dataObject (readonly)

Returns the value of attribute supports_test_data

Returns:

  • (Object)

    the current value of supports_test_data



16
17
18
# File 'lib/ksef/environments.rb', line 16

def supports_test_data
  @supports_test_data
end

Instance Method Details

#production?Boolean

Returns:

  • (Boolean)


21
# File 'lib/ksef/environments.rb', line 21

def production? = name == :prod

#test_data_api?Boolean

TEST alone exposes the /testdata/* helper API and /collective-identifiers*. Code touching those paths must be guarded on this.

Returns:

  • (Boolean)


19
# File 'lib/ksef/environments.rb', line 19

def test_data_api? = supports_test_data