Sha256: f1a7b1fcb887a05dc949228c4a3935008899ac52a12bf75306329c7db24d0a7a
Contents?: true
Size: 676 Bytes
Versions: 3
Compression:
Stored size: 676 Bytes
Contents
module Archruby module Architecture class FileContent def initialize base_directory # base_directory "/Users/sergiomiranda/Labs/ruby_arch_checker/arch_checker/spec/dummy_app/app" @base_directory = base_directory end def all_content_from_directory directory return if directory.nil? || directory.eql?("") content = {} file_paths = Dir.glob("#{@base_directory}/#{directory}") file_paths.each do | file_path | file = File.open(file_path, 'r') file_name = File.basename(file_path, '.rb') content[file_name] = file.read end content end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
archruby-0.2.0 | lib/archruby/architecture/file_content.rb |
archruby-0.1.1 | lib/archruby/architecture/file_content.rb |
archruby-0.1.0 | lib/archruby/architecture/file_content.rb |