Class: RoRoSupport::Misc::Req
- Inherits:
-
Object
- Object
- RoRoSupport::Misc::Req
- Defined in:
- lib/roro_support/misc.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
Returns the value of attribute files.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Req
constructor
list all files in dir.
- #that(dir) ⇒ Object
Constructor Details
#initialize ⇒ Req
list all files in dir
76 77 78 |
# File 'lib/roro_support/misc.rb', line 76 def initialize @files = {} end |
Instance Attribute Details
#files ⇒ Object
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.("../#{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 |