Sha256: 4fb5357383648ba0454d2f197da0ce72b0b8bce3b6ab658c6e1fd8b2e6b1a749
Contents?: true
Size: 381 Bytes
Versions: 8
Compression:
Stored size: 381 Bytes
Contents
require "rbfs/host" module Rbfs class HostParser include Enumerable def initialize(file) @file = file end def each(&block) lines = @file.read.split("\n") lines.reject! {|line| line.strip.start_with? "#" } lines.reject! {|line| line.strip.empty? } lines.each do |line| yield(Host.new(line)) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems