class CodeInventory::JSONFile

Public Class Methods

new(json_file) click to toggle source
# File lib/codeinventory/json_file.rb, line 5
def initialize(json_file)
  @projects = JSON.load(json_file)
end

Public Instance Methods

projects() { |p| ... } click to toggle source
# File lib/codeinventory/json_file.rb, line 9
def projects
  if block_given?
    @projects.each { |p| yield p }
  end
  @projects
end