Class: RoRoSupport::Misc::Req

Inherits:
Object
  • Object
show all
Defined in:
lib/roro_support/misc.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReq

list all files in dir



76
77
78
# File 'lib/roro_support/misc.rb', line 76

def initialize
  @files = {}
end

Instance Attribute Details

#filesObject

Returns the value of attribute files.



73
74
75
# File 'lib/roro_support/misc.rb', line 73

def files
  @files
end

Class Method Details

.all_files_in(dir_path) ⇒ Object



85
86
87
88
89
90
# File 'lib/roro_support/misc.rb', line 85

def self.all_files_in(dir_path)
  dirname = dir_path.split('/').last.gsub(/\.rb/, '')
  Dir[File.expand_path("../#{dirname}/**", dir_path)].each do |file|
    require file
  end
end

Instance Method Details

#that(dir) ⇒ Object



80
81
82
83
# File 'lib/roro_support/misc.rb', line 80

def that(dir)
  dir_load dir
  self
end