Class: NcsNavigator::Configuration::SecondarySamplingUnit

Inherits:
Struct
  • Object
show all
Defined in:
lib/ncs_navigator/configuration/sampling_units.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSecondarySamplingUnit

Returns a new instance of SecondarySamplingUnit.



41
42
43
44
# File 'lib/ncs_navigator/configuration/sampling_units.rb', line 41

def initialize(*)
  super
  sampling_unit_area.secondary_sampling_units << self
end

Instance Attribute Details

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



40
41
42
# File 'lib/ncs_navigator/configuration/sampling_units.rb', line 40

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



40
41
42
# File 'lib/ncs_navigator/configuration/sampling_units.rb', line 40

def name
  @name
end

#sampling_unit_areaObject Also known as: area

Returns the value of attribute sampling_unit_area

Returns:

  • (Object)

    the current value of sampling_unit_area



40
41
42
# File 'lib/ncs_navigator/configuration/sampling_units.rb', line 40

def sampling_unit_area
  @sampling_unit_area
end

Instance Method Details

#primary_sampling_unitPrimarySamplingUnit Also known as: psu

Returns the PSU to which this SSU belongs.

Returns:



48
49
50
# File 'lib/ncs_navigator/configuration/sampling_units.rb', line 48

def primary_sampling_unit
  area.psu
end

#tertiary_sampling_unitsTertiarySamplingUnit Also known as: tsus

Returns any TSUs defined for this SSU.

Returns:



54
55
56
# File 'lib/ncs_navigator/configuration/sampling_units.rb', line 54

def tertiary_sampling_units
  @tertiary_sampling_units ||= []
end