Class: QuoteGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/models/quote_generator.rb

Class Method Summary collapse

Class Method Details

.choose_quote(idx) ⇒ Object



14
15
16
# File 'lib/models/quote_generator.rb', line 14

def choose_quote(idx)
    @quotes[idx][0]
end

.quote_indexObject



9
10
11
12
# File 'lib/models/quote_generator.rb', line 9

def quote_index
    # @fixed_idx == 6 ? @fixed_idx = 0 : @fixed_idx += 1 # <-- # DEMO
    rand(35) # <-- PRODUCTION
end

.quote_sound(idx) ⇒ Object



18
19
20
# File 'lib/models/quote_generator.rb', line 18

def quote_sound(idx)
    @quotes[idx][1]
end