cobaltpet / swl-tool

A ruby script for fetching, parsing, and displaying EiBi shortwave broadcast schedules
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Implement a region struct to describe broadcast targets #25

Open cobaltpet opened 7 years ago

cobaltpet commented 7 years ago

A region struct that describes broadcast targets would be useful in consistently displaying and filtering the schedule data. In particular, such a struct would affect the doesBroadcastMatchRegionFilter method

# all properties are strings, and optional
BroadcastTarget = Struct::new(:continent, :region, :isoCountryCode) 
bt1 = BroadcastTarget.new
bt1[:continent] = "NA"
bt1[:region] = "WNA"
bt1[:country] = "us"

bt2 = BroadcastTarget.new
bt2[:continent] = "As"
bt2[:region] = "FE"