| Class | TidyFFI::Tidy |
| In: |
lib/tidy_ffi/tidy.rb
lib/tidy_ffi/tidy.rb |
| Parent: | Object |
Clean and simple interface to Tidy
| OptionsContainer | = | TidyFFI::OptionsContainer |
| OptionsContainer | = | TidyFFI::OptionsContainer |
| validate_options | [W] | |
| validate_options | [W] |
Returns cleaned string
# File lib/tidy_ffi/tidy.rb, line 29
29: def self.clean(str, options = {})
30: new(str, options).clean
31: end
Returns cleaned string
# File lib/tidy_ffi/tidy.rb, line 29
29: def self.clean(str, options = {})
30: new(str, options).clean
31: end
When true it validates name and option type (default is true).
# File lib/tidy_ffi/tidy.rb, line 78
78: def validate_options?
79: @validate_options != false
80: end
When true it validates name and option type (default is true).
# File lib/tidy_ffi/tidy.rb, line 78
78: def validate_options?
79: @validate_options != false
80: end
Returns cleaned string
# File lib/tidy_ffi/tidy.rb, line 18
18: def clean
19: @clean ||= TidyFFI::Interface.with_doc do |doc|
20: doc.apply_options(@options.to_hash!)
21: doc.string = @string
22: doc.clean
23: @errors = doc.errors
24: doc.output
25: end
26: end
Returns cleaned string
# File lib/tidy_ffi/tidy.rb, line 18
18: def clean
19: @clean ||= TidyFFI::Interface.with_doc do |doc|
20: doc.apply_options(@options.to_hash!)
21: doc.string = @string
22: doc.clean
23: @errors = doc.errors
24: doc.output
25: end
26: end