class Russial

Constants

VERSION

Attributes

dictionary[R]
path[RW]
substitutions[R]
word[R]

Public Class Methods

new(word, dictionary: {}, substitutions: {}) click to toggle source
# File lib/russial.rb, line 27
def initialize(word, dictionary: {}, substitutions: {})
  @word = word.to_sym
  @dictionary = prepare_dictionary(dictionary)
  @substitutions = substitutions || {}
  @path = []
end

Public Instance Methods

reset() click to toggle source
# File lib/russial.rb, line 34
def reset
  reset_path
  self
end

Private Instance Methods

reset_path() click to toggle source
# File lib/russial.rb, line 48
def reset_path
  self.path = []
end
result() click to toggle source
Calls superclass method Russial::Dictionary::Defaults#result
# File lib/russial.rb, line 52
def result
  dictionary.dig(*path) || super
end
soft_reset_path() click to toggle source
# File lib/russial.rb, line 44
def soft_reset_path
  path.pop
end