Class: TextTransformerOptions
- Inherits:
-
Object
- Object
- TextTransformerOptions
- Defined in:
- lib/rails5/spec_converter/text_transformer_options.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
Returns the value of attribute file_path.
-
#hash_spacing ⇒ Object
Returns the value of attribute hash_spacing.
-
#indent ⇒ Object
Returns the value of attribute indent.
-
#quiet ⇒ Object
writeonly
Sets the attribute quiet.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
-
#warn_if_ambiguous ⇒ Object
writeonly
Sets the attribute warn_if_ambiguous.
Instance Method Summary collapse
-
#initialize ⇒ TextTransformerOptions
constructor
A new instance of TextTransformerOptions.
- #quiet? ⇒ Boolean
- #warn_about_ambiguous_params? ⇒ Boolean
- #wrap_ambiguous_params? ⇒ Boolean
Constructor Details
#initialize ⇒ TextTransformerOptions
5 6 7 8 9 10 11 12 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 5 def initialize @file_path = nil @strategy = :optimistic @quiet = false @indent = ' ' @hash_spacing = nil @warn_if_ambiguous = false end |
Instance Attribute Details
#file_path ⇒ Object
Returns the value of attribute file_path.
2 3 4 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 2 def file_path @file_path end |
#hash_spacing ⇒ Object
Returns the value of attribute hash_spacing.
2 3 4 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 2 def hash_spacing @hash_spacing end |
#indent ⇒ Object
Returns the value of attribute indent.
2 3 4 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 2 def indent @indent end |
#quiet=(value) ⇒ Object (writeonly)
Sets the attribute quiet
3 4 5 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 3 def quiet=(value) @quiet = value end |
#strategy ⇒ Object
Returns the value of attribute strategy.
2 3 4 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 2 def strategy @strategy end |
#warn_if_ambiguous=(value) ⇒ Object (writeonly)
Sets the attribute warn_if_ambiguous
3 4 5 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 3 def warn_if_ambiguous=(value) @warn_if_ambiguous = value end |
Instance Method Details
#quiet? ⇒ Boolean
22 23 24 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 22 def quiet? @quiet end |
#warn_about_ambiguous_params? ⇒ Boolean
18 19 20 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 18 def warn_about_ambiguous_params? @warn_if_ambiguous end |
#wrap_ambiguous_params? ⇒ Boolean
14 15 16 |
# File 'lib/rails5/spec_converter/text_transformer_options.rb', line 14 def wrap_ambiguous_params? @strategy == :optimistic end |