lib/ika3/schedule.rb in ika3-0.8.0 vs lib/ika3/schedule.rb in ika3-0.8.1
- old
+ new
@@ -22,20 +22,20 @@
modes = %w[regular bankara_challenge bankara_open x fest]
schedules = %w[now next]
schedules.each do |schedule|
modes.each do |mode|
- define_method("#{mode}_#{schedule}".to_sym) do
+ define_method(:"#{mode}_#{schedule}") do
if instance_variable_defined?("@#{mode}_#{schedule}_obj")
return instance_variable_get("@#{mode}_#{schedule}_obj")
end
instance_variable_set("@#{mode}_#{schedule}_obj",
send_request(:get, "/api/#{mode.dasherize}/#{schedule}").body.results[0])
end
end
- define_method("salmon_run_#{schedule}".to_sym) do
+ define_method(:"salmon_run_#{schedule}") do
if instance_variable_defined?("@salmon_run_#{schedule}_obj")
return instance_variable_get("@salmon_run_#{schedule}_obj")
end
instance_variable_set("@salmon_run_#{schedule}_obj",