Class: WrfLibrary::Entity::Station

Inherits:
Object
  • Object
show all
Defined in:
lib/wrf_library/entity/station.rb

Overview

Simple data class to represent a station entity

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, descriptor, elevation, geo_coordinate) ⇒ Station

initialization

Parameters:

  • name (String)

    the name of the station

  • descriptor (String)

    the description of the station

  • elevation (Number)

    the elevation of the station

  • geo_coordinate (Coordinate)

    the geo coordinates of the station



22
23
24
25
26
27
# File 'lib/wrf_library/entity/station.rb', line 22

def initialize(name, descriptor, elevation, geo_coordinate)
  @name = name
  @descriptor = descriptor
  @elevation = elevation
  @coordinate = geo_coordinate
end

Instance Attribute Details

#coordinateCoordinate (readonly)

Returns the geo coordinates of the station.

Returns:

  • (Coordinate)

    the geo coordinates of the station



15
16
17
# File 'lib/wrf_library/entity/station.rb', line 15

def coordinate
  @coordinate
end

#descriptorString (readonly)

Returns the description of the station.

Returns:

  • (String)

    the description of the station



11
12
13
# File 'lib/wrf_library/entity/station.rb', line 11

def descriptor
  @descriptor
end

#elevationNumber (readonly)

Returns the elevation of the station.

Returns:

  • (Number)

    the elevation of the station



13
14
15
# File 'lib/wrf_library/entity/station.rb', line 13

def elevation
  @elevation
end

#nameString (readonly)

Returns the name of the station.

Returns:

  • (String)

    the name of the station



9
10
11
# File 'lib/wrf_library/entity/station.rb', line 9

def name
  @name
end