spec/zenlish/support/var2word.rb in zenlish-0.2.05 vs spec/zenlish/support/var2word.rb in zenlish-0.2.06

- old
+ new

@@ -1,9 +1,15 @@ +# frozen_string_literal: true + require_relative 'minimal_lexicon' require_relative '../../../lib/zenlish/lex/literal' module Zenlish + # rubocop: disable Layout/EmptyLineBetweenDefs + # rubocop: disable Layout/SpaceBeforeSemicolon + # rubocop: disable Style/SingleLineMethods + # Utility module. It defines variables that each are assgned a # Literal object. module Var2Word def get_lexeme(aLemma, aWordClass = nil) Zenlish::Lang::Dictionary.get_lexeme(aLemma, aWordClass) @@ -104,20 +110,20 @@ literal2var('have', 'has') literal2var('have', 'have') literal2var('hear', 'hear') literal2var('hear', 'heard') literal2var('hear', 'hears') - def here ; Lex::Literal.new('here', get_lexeme('here', WClasses::Adverb), 0) ; end - def here_as_noun ; Lex::Literal.new('here', get_lexeme('here', WClasses::CommonNoun), 0) ; end + def here ; Lex::Literal.new('here', get_lexeme('here', WClasses::Adverb), 0) ; end + def here_as_noun ; Lex::Literal.new('here', get_lexeme('here', WClasses::CommonNoun), 0) ; end def i_pronoun ; Lex::Literal.new('I', get_lexeme('I'), 0) ; end literal2var('if', 'if', '_') literal2var('in', 'in', '_') literal2var('inside', 'inside') literal2var('it', 'it', '_') literal2var('its', 'its') literal2var('J', 'j', '_') - def is ; Lex::Literal.new('is', get_lexeme('be', WClasses::IrregularVerbBe), 0) ; end + def is ; Lex::Literal.new('is', get_lexeme('be', WClasses::IrregularVerbBe), 0) ; end def is_aux ; Lex::Literal.new('is', get_lexeme('be', WClasses::AuxiliaryBe), 0) ; end literal2var('K', 'k', '_') literal2var('kind', 'kind') literal2var('kind', 'kinds') literal2var('know', 'knew') @@ -214,11 +220,11 @@ literal2var('use', 'using') literal2var('very', 'very') literal2var('want', 'want') literal2var('want', 'wants') def was ; Lex::Literal.new('was', get_lexeme('be', WClasses::IrregularVerbBe), 0) ; end - def were ; Lex::Literal.new('were', get_lexeme('be', WClasses::IrregularVerbBe), 0) ; end + def were ; Lex::Literal.new('were', get_lexeme('be', WClasses::IrregularVerbBe), 0) ; end literal2var('what', 'what') literal2var('when', 'when', '_') def where ; Lex::Literal.new('where', get_lexeme('where', WClasses::Adverb), 0) ; end def where_conjunction ; Lex::Literal.new('where', get_lexeme('where', WClasses::SubordinatingConjunction), 0) ; end literal2var('who', 'who') @@ -226,11 +232,14 @@ literal2var('word', 'words') def x_as_noun ; Lex::Literal.new('X', get_lexeme('X'), 0) ; end literal2var('you', 'you') literal2var('you', 'your') - def colon ; Lex::Literal.new(':', get_lexeme(':'), 0) ; end - def comma ; Lex::Literal.new(',', get_lexeme(','), 0) ; end - def dot ; Lex::Literal.new('.', get_lexeme('.'), 0) ; end - def quote ; Lex::Literal.new('"', get_lexeme('"'), 0) ; end + def colon ; Lex::Literal.new(':', get_lexeme(':'), 0) ; end + def comma ; Lex::Literal.new(',', get_lexeme(','), 0) ; end + def dot ; Lex::Literal.new('.', get_lexeme('.'), 0) ; end + def quote ; Lex::Literal.new('"', get_lexeme('"'), 0) ; end end # module -end # module \ No newline at end of file + # rubocop: enable Style/SingleLineMethods + # rubocop: enable Layout/SpaceBeforeSemicolon + # rubocop: enable Layout/EmptyLineBetweenDefs +end # module