Class: CodeInventory::JSONFile
- Inherits:
-
Object
- Object
- CodeInventory::JSONFile
- Defined in:
- lib/codeinventory/json_file.rb
Instance Method Summary collapse
-
#initialize(json_file) ⇒ JSONFile
constructor
A new instance of JSONFile.
- #projects ⇒ Object
Constructor Details
#initialize(json_file) ⇒ JSONFile
5 6 7 |
# File 'lib/codeinventory/json_file.rb', line 5 def initialize(json_file) @projects = JSON.load(json_file) end |
Instance Method Details
#projects ⇒ Object
9 10 11 12 13 14 |
# File 'lib/codeinventory/json_file.rb', line 9 def projects if block_given? @projects.each { |p| yield p } end @projects end |