This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GradeStudents | |
def self.call(teacher_name, course_name, grade_list) | |
course = CourseRegistry.lookup(course_name) | |
teacher = TeacherRegistry.lookup(teacher_name) | |
course.for_each_student do |student| | |
if grade = grade_list[student.name] | |
student.complete_course(course, grade) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TennisGame | |
def player_one_scores | |
end | |
def player_two_scores | |
end | |
def score | |
"Love All" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UserController < ActionController::Base | |
def new | |
@user = User.new | |
end | |
def create | |
result = SignupUser.call(params[:user]) | |
if result.successful? | |
redirect_to root_url, notice: "A welcome e-mail is on it's way!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ABOUT TO CALL POST FROM TESTS WITH THIS DATA | |
data: {} | |
source=rack-timeout id=40677bbc82995734013bd5f9f961a8d8 timeout=20000ms state=ready | |
Started POST "/api/purchases" for 127.0.0.1 at 2015-06-25 11:49:41 -0700 | |
source=rack-timeout id=40677bbc82995734013bd5f9f961a8d8 timeout=20000ms service=5ms state=active | |
Processing by Api::PurchasesController#create as HTML | |
Parameters: {"purchase"=>{}} |
OlderNewer