Class: RoRoSupport::Req

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReq

list all files in dir



6
7
8
# File 'lib/roro_support/req.rb', line 6

def initialize
  @files = {}
end

Instance Attribute Details

#filesObject

Returns the value of attribute files.



3
4
5
# File 'lib/roro_support/req.rb', line 3

def files
  @files
end

Class Method Details

.all_files_in(dir_path) ⇒ Object



15
16
17
18
19
20
# File 'lib/roro_support/req.rb', line 15

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



10
11
12
13
# File 'lib/roro_support/req.rb', line 10

def that(dir)
  dir_load dir
  self
end