Module: NcsNavigator::Warehouse::Models::MdesModelCollection

Defined in:
lib/ncs_navigator/warehouse/models/mdes_model_collection.rb

Overview

Extensions for the modules that form a namespace for a particular MDES version's models. The methods here are available at the module level of the namespace module.

Instance Method Summary collapse

Instance Method Details

#mdes_order(*model_classes) ⇒ Array<Class> #mdes_orderArray<Class>

Sets or retrieves the required table order.

Overloads:

  • #mdes_order(*model_classes) ⇒ Array<Class>

    Sets the output order.

    Parameters:

    • model_classes (Array<Class>)

      the order

  • #mdes_orderArray<Class>

    Retrieves the output order.

Returns:

  • (Array<Class>)


56
57
58
59
60
61
62
# File 'lib/ncs_navigator/warehouse/models/mdes_model_collection.rb', line 56

def mdes_order(*input)
  if input.empty?
    @mdes_order
  else
    @mdes_order = input
  end
end

#mdes_specification_version(version_string) ⇒ String #mdes_specification_versionString

Sets or retrieves the specification version that this collection represents.

Overloads:

  • #mdes_specification_version(version_string) ⇒ String

    Sets the specification version.

    Parameters:

    • version_string (String)

      the version

  • #mdes_specification_versionString

    Retrieves the specification version.

Returns:

  • (String)


38
39
40
41
42
43
44
# File 'lib/ncs_navigator/warehouse/models/mdes_model_collection.rb', line 38

def mdes_specification_version(version_string=nil)
  if version_string
    @mdes_specification_version = version_string
  else
    @mdes_specification_version
  end
end

#mdes_version(version_string) ⇒ String #mdes_versionString

Sets or retrieves the version that this collection represents.

Overloads:

  • #mdes_version(version_string) ⇒ String

    Sets the version.

    Parameters:

    • version_string (String)

      the version

  • #mdes_versionString

    Retrieves the version.

Returns:

  • (String)


19
20
21
22
23
24
25
# File 'lib/ncs_navigator/warehouse/models/mdes_model_collection.rb', line 19

def mdes_version(version_string=nil)
  if version_string
    @mdes_version = version_string
  else
    @mdes_version
  end
end