module
JosieHealth::LUT::DataFiles
Overview
Provides access to bundled data files
Defined in:
data_files.crConstant Summary
-
ALCOHOL_DATA =
{{ read_file("/home/josie/development/personal/josiedot/health/josie-health-lut/src/../data/alcohol.json") }} -
CAFFEINE_DATA =
{{ read_file("/home/josie/development/personal/josiedot/health/josie-health-lut/src/../data/caffeine.json") }} -
CANNABIS_DATA =
{{ read_file("/home/josie/development/personal/josiedot/health/josie-health-lut/src/../data/cannabis.json") }} -
COMBOS_DATA =
{{ read_file("/home/josie/development/personal/josiedot/health/josie-health-lut/src/../data/combos.json") }} -
DRUGS_DATA =
{{ read_file("/home/josie/development/personal/josiedot/health/josie-health-lut/src/../data/drugs.json") }} -
Embed data files at compile time
-
MEDS_DATA =
{{ read_file("/home/josie/development/personal/josiedot/health/josie-health-lut/src/../data/meds.json") }}
Class Method Summary
-
.alcohol : JSON::Any
Load and cache alcohol.json
-
.all_substances : Array(String)
Get all substance names from drugs.json
-
.caffeine : JSON::Any
Load and cache caffeine.json
-
.cannabis : JSON::Any
Load and cache cannabis.json
-
.categories(name : String) : Array(String)
Get categories for a substance
-
.combos : JSON::Any
Load and cache combos.json
-
.drugs : JSON::Any
Load and cache drugs.json
-
.interaction(substance1 : String, substance2 : String) : JSON::Any | Nil
Get interaction info from combos.json
-
.meds : JSON::Any
Load and cache meds.json
-
.pretty_name(name : String) : String | Nil
Get pretty name for a substance
-
.substance_info(name : String) : JSON::Any | Nil
Get substance info from drugs.json
Class Method Detail
def self.interaction(substance1 : String, substance2 : String) : JSON::Any | Nil
#
Get interaction info from combos.json