Class: WrfLibrary::JsonConverter::HourlyJsonConverter

Inherits:
WrfStationJsonConverter show all
Defined in:
lib/wrf_library/json_converter/hourly_converter.rb

Overview

Child class to generate valid json output for the result data of a given wrf meteogram result already stored in a data repository

Instance Attribute Summary collapse

Attributes inherited from BaseStationJsonConverter

#data

Instance Method Summary collapse

Methods inherited from WrfStationJsonConverter

#add_additions, #generate_grid_coordinates, #generate_grid_data

Methods inherited from BaseStationJsonConverter

#add_additions, #convert, #generate_data_values, #generate_meta_hash, #generate_station_hash

Constructor Details

#initialize(measurand, handler) ⇒ HourlyJsonConverter

initialization

Parameters:

  • measurand (Symbol)

    the used measurand

  • handler (Wrf::Handler)

    the data handler with the wrf data



14
15
16
17
18
# File 'lib/wrf_library/json_converter/hourly_converter.rb', line 14

def initialize(measurand, handler)
  super(handler.data_repository)
  @handler = handler
  @measurand = measurand
end

Instance Attribute Details

#handlerWrf::Handler (readonly, private)

Returns the wrf handler with the data.

Returns:



23
24
25
# File 'lib/wrf_library/json_converter/hourly_converter.rb', line 23

def handler
  @handler
end

#measurandSymbol (readonly, private)

Returns the used measurand.

Returns:

  • (Symbol)

    the used measurand



25
26
27
# File 'lib/wrf_library/json_converter/hourly_converter.rb', line 25

def measurand
  @measurand
end