Class: Chemlab::CLI::Stubber
- Inherits:
-
Object
- Object
- Chemlab::CLI::Stubber
- Defined in:
- lib/chemlab/cli/stubber.rb
Overview
This class is dedicated to stubbing Page Libraries
Defined Under Namespace
Classes: PageLibrary
Class Method Summary collapse
- .libraries ⇒ Object
-
.stub_all(path) ⇒ Object
Generate all stubs in a particular path.
Class Method Details
.libraries ⇒ Object
11 12 13 |
# File 'lib/chemlab/cli/stubber.rb', line 11 def libraries @libraries ||= [] end |
.stub_all(path) ⇒ Object
Generate all stubs in a particular path
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/chemlab/cli/stubber.rb', line 16 def stub_all(path) Array(path).each do |p| p = File.(p) PageLibrary.new(p).generate_stub if File.file?(p) Dir["#{p}/**/*.rb"].each do |f| next if File.basename(f).include?('.stub.') PageLibrary.new(f).generate_stub end end end |