-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annoucement cleanup #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from a few comments, code looks good.
opens_dir(source_directory, output_directory, announcement_directory) | ||
source_directory = validates_source_directory(args[0]) | ||
output_directory = args[1] | ||
opens_dir(source_directory, output_directory) | ||
end | ||
|
||
def self.validates_source_directory(directory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a better name for this method would be validated_source_directory
perhaps?
require_relative "exceptions" | ||
|
||
module Blacklight | ||
def self.iterate_course(xml_data, course) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would rather these methods were pure. Would it make sense to return a new course with these values set?
puts "Created a file in #{original_name}" | ||
end | ||
def set_values(name, value) | ||
@canvas.send(name + "=", value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider interpolating the setter @canvas.send("#{name}=", value)
end | ||
|
||
def self.iterate_notificationrules(xml_data, course) | ||
def self.create_random_hex | ||
"i" + SecureRandom.hex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is with the i
?
No description provided.