Class: Cupper::OhaiPlugin

Inherits:
Object
  • Object
show all
Defined in:
lib/cupper/ohai_plugins.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#plugins_pathObject (readonly)

Returns the value of attribute plugins_path.



4
5
6
# File 'lib/cupper/ohai_plugins.rb', line 4

def plugins_path
  @plugins_path
end

Instance Method Details

#listObject



6
7
8
9
10
11
# File 'lib/cupper/ohai_plugins.rb', line 6

def list
  @plugins_path = File.expand_path '../../cupper/plugins/ohai', __FILE__
  @plugins = Dir.entries(@plugins_path).reject{ |entry| entry == '.' || entry == '..'  }
  @plugins.each { |plugin| plugin.chomp!(".rb") }
  @plugins.sort
end