Sha256: 5b40c9e1c047181785953b600aee80daa56d49ec64c2d3c4485b47c88fea021b

Contents?: true

Size: 309 Bytes

Versions: 3

Compression:

Stored size: 309 Bytes

Contents

class <%= class_name %>

  class << self

    def generate
      greetings.sample
    end

  protected

    def greetings
      @greetings ||= load_txt_file 'greetings.txt'
    end

  private

    def load_txt_file file_name
      (File.readlines (File.join 'lib', file_name)).map &:strip
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
twitter_bot_generator-0.1.6 lib/twitter_bot_generator/templates/src/test_bot.rb.erb
twitter_bot_generator-0.1.5 lib/twitter_bot_generator/templates/src/test_bot.rb.erb
twitter_bot_generator-0.1.4 lib/twitter_bot_generator/templates/src/test_bot.rb.erb