Class: WrfLibrary::JsonConverter::HourlySumJsonConverter

Inherits:
HourlyJsonConverter show all
Defined in:
lib/wrf_library/json_converter/hourly_sum_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

Attributes inherited from HourlyJsonConverter

#handler, #measurand

Attributes inherited from BaseStationJsonConverter

#data

Instance Method Summary collapse

Methods inherited from HourlyJsonConverter

#initialize

Methods inherited from WrfStationJsonConverter

#add_additions, #generate_grid_coordinates, #generate_grid_data

Methods inherited from BaseStationJsonConverter

#add_additions, #convert, #generate_meta_hash, #generate_station_hash, #initialize

Constructor Details

This class inherits a constructor from WrfLibrary::JsonConverter::HourlyJsonConverter

Instance Method Details

#generate_data_valuesHash (private)

implementation of the abstract parent method to create valid json objects for the stored data values

Returns:

  • (Hash)

    the key-value hashes for the json output



16
17
18
19
# File 'lib/wrf_library/json_converter/hourly_sum_converter.rb', line 16

def generate_data_values
  {@measurand.to_s.tr("@", "") => 
    WrfLibrary::Statistic::Hourly.calculate_hourly_rainsum(@handler) }
end