Class: TextTransformerOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/rails5/spec_converter/text_transformer_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTextTransformerOptions



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_pathObject

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_spacingObject

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

#indentObject

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

#strategyObject

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