Class: Crazipsum::Dictionnary

Inherits:
Object
  • Object
show all
Defined in:
lib/crazipsum/dictionnary.rb

Overview

Dictionnary is a simple struct with a #words and #fillers read-only attributes. It is used to initialize the Generator instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(words, fillers: []) ⇒ Dictionnary

Returns a new instance of Dictionnary.



10
11
12
13
# File 'lib/crazipsum/dictionnary.rb', line 10

def initialize(words, fillers: [])
  @words = words
  @fillers = fillers
end

Instance Attribute Details

#fillersObject (readonly)

Returns the value of attribute fillers.



8
9
10
# File 'lib/crazipsum/dictionnary.rb', line 8

def fillers
  @fillers
end

#wordsObject (readonly)

Returns the value of attribute words.



8
9
10
# File 'lib/crazipsum/dictionnary.rb', line 8

def words
  @words
end