Sha256: 61d5d05b805c817c8ad6ecbbc2dddc560243e47de82ac5d241eca6197264db08

Contents?: true

Size: 254 Bytes

Versions: 5

Compression:

Stored size: 254 Bytes

Contents

require "json"

module CodeInventory
  class JSONFile
    def initialize(json_file)
      @projects = JSON.load(json_file)
    end

    def projects
      if block_given?
        @projects.each { |p| yield p }
      end
      @projects
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
codeinventory-0.3.1 lib/codeinventory/json_file.rb
codeinventory-0.3.0 lib/codeinventory/json_file.rb
codeinventory-0.2.1 lib/codeinventory/json_file.rb
codeinventory-0.2.0 lib/codeinventory/json_file.rb
codeinventory-0.1.3 lib/codeinventory/json_file.rb