Sha256: 8dd3384a0aaf540bb6a0bfe24e5e9e4cffd2aaaa88359870f0acc80e02476f87

Contents?: true

Size: 542 Bytes

Versions: 16

Compression:

Stored size: 542 Bytes

Contents

require 'ruby-progressbar'
module Clienteer
  module Ingester
    class YAMLFile

      def self.get_clients
        YAML.load_file("data/mindbody.yml")
      end

      def initialize
        @clients = YAMLFile.get_clients
        $progressbar = ProgressBar.create total: @clients.length, format: '%a %bᗧ%i %p%% %t', progress_mark: ' ', remainder_mark: '・'
      end

      def each
        @clients.each do |c|
          $progressbar.increment
          object = {raw: c}
          yield object
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
clienteer-1.7.3 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.7.2 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.7.1 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.7.0 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.6.0 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.12 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.11 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.10 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.9 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.8 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.7 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.6 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.5 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.4 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.3 lib/clienteer/ingesters/yaml_file.rb
clienteer-1.5.2 lib/clienteer/ingesters/yaml_file.rb