Skip to content

Instantly share code, notes, and snippets.

View eric-wood's full-sized avatar
🥑
probably snacking

Eric Wood eric-wood

🥑
probably snacking
View GitHub Profile
class Shoutout
%w(yo yoyo yoyoma).each do |action|
define_method("perform_#{action}") do |argument|
"performing #{action.gsub('_', ' ')}"
end
end
end
shout = Shoutout.new
puts shout.yo()
@alphabet = [" ","a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l",
"m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
def encrypt(message)
key_length = message.length
message.downcase.split("").map! { |x|
idx_number = @alphabet.index(x)
finish = idx_number.to_i + key_length.to_i
unless finish < 27
module SurveysToBeTaken
def survey_index
@today = Date.today.strftime("%m/%d/%Y")
# Take all surveys and only fetch current_users results. This also checks
map_survey_ids = Survey.pluck(:id)
user = params[:user_id].present? ? params[:user_id] : current_user.id