RadiusNetworks / scanbeacon-gem

A Ruby gem for scanning beacons
MIT License
30 stars 9 forks source link

Move gem defaults to main gem loader #27

Closed cupakromer closed 8 years ago

cupakromer commented 8 years ago

With the defaults being set in the individual files it causes constant redefined warnings if more than one of these files is loaded. The intent is for these values to be set based on the operation system. The main gem entry point already has the check and loads the appropriate scanner and advertiser classes. However, a consumer can still manually load one of the other files which will cause the warning.

This changes where the constants are defined so that they are only defined in the main gem entry point. This makes it explicit that these constants are set once based on the OS. It also frees up consumers to require non-OS classes for whatever reason they choose, without causing conflicts to the OS default constants.

syoder commented 8 years ago

👍