Class: DeepL::Resources::ConfiguredRules

Inherits:
Object
  • Object
show all
Defined in:
lib/deepl/resources/style_rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configured_rules_data) ⇒ ConfiguredRules

Returns a new instance of ConfiguredRules.



14
15
16
17
18
19
20
21
22
# File 'lib/deepl/resources/style_rule.rb', line 14

def initialize(configured_rules_data)
  @dates_and_times = extract_rule(configured_rules_data, 'dates_and_times')
  @formatting = extract_rule(configured_rules_data, 'formatting')
  @numbers = extract_rule(configured_rules_data, 'numbers')
  @punctuation = extract_rule(configured_rules_data, 'punctuation')
  @spelling_and_grammar = extract_rule(configured_rules_data, 'spelling_and_grammar')
  @style_and_tone = extract_rule(configured_rules_data, 'style_and_tone')
  @vocabulary = extract_rule(configured_rules_data, 'vocabulary')
end

Instance Attribute Details

#dates_and_timesObject (readonly)

Returns the value of attribute dates_and_times.



11
12
13
# File 'lib/deepl/resources/style_rule.rb', line 11

def dates_and_times
  @dates_and_times
end

#formattingObject (readonly)

Returns the value of attribute formatting.



11
12
13
# File 'lib/deepl/resources/style_rule.rb', line 11

def formatting
  @formatting
end

#numbersObject (readonly)

Returns the value of attribute numbers.



11
12
13
# File 'lib/deepl/resources/style_rule.rb', line 11

def numbers
  @numbers
end

#punctuationObject (readonly)

Returns the value of attribute punctuation.



11
12
13
# File 'lib/deepl/resources/style_rule.rb', line 11

def punctuation
  @punctuation
end

#spelling_and_grammarObject (readonly)

Returns the value of attribute spelling_and_grammar.



11
12
13
# File 'lib/deepl/resources/style_rule.rb', line 11

def spelling_and_grammar
  @spelling_and_grammar
end

#style_and_toneObject (readonly)

Returns the value of attribute style_and_tone.



11
12
13
# File 'lib/deepl/resources/style_rule.rb', line 11

def style_and_tone
  @style_and_tone
end

#vocabularyObject (readonly)

Returns the value of attribute vocabulary.



11
12
13
# File 'lib/deepl/resources/style_rule.rb', line 11

def vocabulary
  @vocabulary
end