lib/total.rb in total-0.2.0 vs lib/total.rb in total-0.3.0

- old
+ new

@@ -21,10 +21,11 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. require_relative 'total/linux' +require_relative 'total/freebsd' require_relative 'total/osx' # Total is a simple class to detect the total amount of memory in the system. # # require 'total' @@ -51,9 +52,10 @@ # Target object to calculate memory size. def target return Total::OSX.new if RUBY_PLATFORM.include?('darwin') return Total::Linux.new if RUBY_PLATFORM.include?('linux') + return Total::FreeBSD.new if RUBY_PLATFORM.include?('freebsd') raise CantDetect, "Can\'t detect operating system: #{RUBY_PLATFORM}" end end end