Class: ConvertToBootstrap3::Converter
- Inherits:
-
Object
- Object
- ConvertToBootstrap3::Converter
- Includes:
- Capybara::DSL
- Defined in:
- lib/convert_to_bootstrap3.rb
Instance Attribute Summary collapse
-
#converter_url ⇒ Object
Returns the value of attribute converter_url.
Instance Method Summary collapse
- #convert_in_place(directory = "") ⇒ Object
-
#initialize ⇒ Converter
constructor
A new instance of Converter.
Constructor Details
#initialize ⇒ Converter
Returns a new instance of Converter.
18 19 20 |
# File 'lib/convert_to_bootstrap3.rb', line 18 def initialize @converter_url = 'http://code.divshot.com/bootstrap3_upgrader/' end |
Instance Attribute Details
#converter_url ⇒ Object
Returns the value of attribute converter_url.
16 17 18 |
# File 'lib/convert_to_bootstrap3.rb', line 16 def converter_url @converter_url end |
Instance Method Details
#convert_in_place(directory = "") ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/convert_to_bootstrap3.rb', line 22 def convert_in_place(directory = "") directory << '**/*.html*' visit @converter_url all_files = Dir.glob(directory).reject { |file| File.directory? file } all_files.each { |file| convert_file_contents(file) } end |