Class: RoCells::Gem

Inherits:
Base show all
Defined in:
lib/ro_cells/gem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_pathsObject

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_commandsObject



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