Class: Hiq::FillerLibrary
- Inherits:
-
Object
- Object
- Hiq::FillerLibrary
- Defined in:
- lib/hiq/domain/filler_library.rb
Overview
Provided of filler for lines of haiku
Instance Attribute Summary collapse
-
#cfillers ⇒ Object
readonly
Returns the value of attribute cfillers.
-
#ifillers ⇒ Object
readonly
Returns the value of attribute ifillers.
Class Method Summary collapse
Instance Method Summary collapse
- #get_const_filler(filler_length) ⇒ Object
- #get_interpolated_filler(filler_length) ⇒ Object
-
#initialize ⇒ FillerLibrary
constructor
A new instance of FillerLibrary.
Constructor Details
#initialize ⇒ FillerLibrary
Returns a new instance of FillerLibrary.
117 118 119 120 |
# File 'lib/hiq/domain/filler_library.rb', line 117 def initialize @ifillers = FillerLibrary.interpolated_fillers @cfillers = FillerLibrary.fillers end |
Instance Attribute Details
#cfillers ⇒ Object (readonly)
Returns the value of attribute cfillers.
115 116 117 |
# File 'lib/hiq/domain/filler_library.rb', line 115 def cfillers @cfillers end |
#ifillers ⇒ Object (readonly)
Returns the value of attribute ifillers.
115 116 117 |
# File 'lib/hiq/domain/filler_library.rb', line 115 def ifillers @ifillers end |
Class Method Details
.fillers ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/hiq/domain/filler_library.rb', line 23 def self.fillers { 5 => [ 'empty riverside', 'tears flow in the rain', 'cheerful summer\'s charm', 'A fallen leaves', "New Year's 1ever", 'of a dog hanged', 'on the pavement', "Valentine's Day", 'a shadow boating', 'airily balloons -', 'cup on tea music', 'evening coolness', 'finally ad bass -', 'override my amps', 'A head lit shelter', 'a bark flower pot', 'and there escapes', 'fan into too fast', 'in the holy sense', 'inside the sunset', 'listening to down', 'on a bird fingers', 'the bag of autumn', 'the bay of a dart', 'the colored world', 'after the pumpkin:', 'at the sudden hair', 'autumn leaf flames', 'comes to an end...', 'for the sun alone', 'in the young weirs', 'on a garbage truck', 'snow fall of roses', 'the saddled slower', 'a wash before sheep', 'affords hot the air', 'in the Honkers mine', 'in the fall flowing', 'milk in the morning', 'someone older bloom', 'the ash leaves splay', 'the lift of a moor,', 'the same quiet rains', '- A hole in the rise', 'October wind through', 'headlights, whiter-et', 'i- two gold her hair', 'just up kin oil beard', 'passing my neighbor', 'pierce drippy second', 'shells in the mirror', 'the sound of a trash', 'the wild powder sack', 'the mister rams trap', 'from the first baleen', 'my mind like a candle', 'snow, leaves two pies', 'the scent of red hair', 'a flank of calm mosque', 'a fan a across', "sin's that dawn light tide" ], 7 => [ 'the vain wind of summer blows', 'gentle breeze upon a mountain', 'a frog jumps into a well', 'around my of finally', 'roses in the forecast', 'follow just overflowed', 'of a traveling machine', 'of allowed in the blade', 'under a clamping lilac -', 'on the Pony.. and snuffer', 'the blinded on a red road', 'the scent of lemon petals', 'the islands in the grab use', 'the noise of a carrier bag', 'young women clean morning -', 'an expecting moon His breaks', 'the boyfriend of my pocket -', 'Spring warding stray or a glass', 'and two pour face all the dock', 'i wish i X on buy band train', 'in the fresh of old plane candle', "we're down the school of her hands" ] } end |
.interpolated_fillers ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/hiq/domain/filler_library.rb', line 9 def self.interpolated_fillers { 1 => ['the X', 'a X', 'X house!'], 2 => ['ghastly X', 'the pale X', 'fog X mince', 'No X jay', 'X the bottle', 'younger X', 'X bark tight', 'with a X winds'], 3 => ['shadow of X', 'X in silence', 'the subway X', 'In the pink X', 'behind an X', 'it bus X moon', 'X the pages'], 4 => ['X of my joy fade', 'X ends the autumn', 'letter to the X', 'X in the window', 'the lines of X', 'the X scattered', 'flat fine go X call', 'from the childhood X'], 5 => ['A spark of X above', 'Slayer wind the way X'], 6 => ['the sad facade of X torn', 'afternoon from I wall X', 'X trees flutter over back '] } end |
Instance Method Details
#get_const_filler(filler_length) ⇒ Object
122 123 124 |
# File 'lib/hiq/domain/filler_library.rb', line 122 def get_const_filler(filler_length) cfillers[filler_length].delete(cfillers[filler_length].sample) end |
#get_interpolated_filler(filler_length) ⇒ Object
126 127 128 |
# File 'lib/hiq/domain/filler_library.rb', line 126 def get_interpolated_filler(filler_length) ifillers[filler_length].delete(ifillers[filler_length].sample) end |