Class: RoCells::Gem
Instance Attribute Summary collapse
-
#ro_commands_paths ⇒ Object
Returns the value of attribute ro_commands_paths.
Instance Method Summary collapse
- #get_all_ro_commands ⇒ Object
-
#initialize(lib_path) ⇒ Gem
constructor
A new instance of Gem.
Constructor Details
#initialize(lib_path) ⇒ Gem
Returns a new instance of Gem.
5 6 7 |
# File 'lib/ro_cells/gem.rb', line 5 def initialize(lib_path) @lib_path = lib_path end |
Instance Attribute Details
#ro_commands_paths ⇒ Object
Returns the value of attribute ro_commands_paths.
9 10 11 |
# File 'lib/ro_cells/gem.rb', line 9 def ro_commands_paths @ro_commands_paths end |
Instance Method Details
#get_all_ro_commands ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/ro_cells/gem.rb', line 17 def get_all_ro_commands if Dir.exist?(File.join(@lib_path, 'ro_commands')) Dir[File.join(@lib_path, 'ro_commands/**')].each do |path| if test(?f, path) and path.match(%r{lib/ro_commands/(.+)\.rb}) ro_commands_paths << path end end end return ro_commands_paths end |