Skip to content

Instantly share code, notes, and snippets.

View cgtfarmer's full-sized avatar

Christian Farmer cgtfarmer

  • PaymentSpring
  • Lincoln, NE
View GitHub Profile
# frozen_string_literal: true
# Q1: “Add an error if the first_name field is an empty string”
# Q2: “Change tax_owed so that it is calculated based on income minus ”
def create_user(input)
errors = []
if input.last_name == null || input.last_name == ''
# frozen_string_literal: true
def create_user(input)
errors = []
if input.last_name == null || input.last_name == ''
errors.push('last_name is required')
else
input.last_name = input.last_name.trim
if input.last_name == ''
@cgtfarmer
cgtfarmer / After.java
Last active May 23, 2024 19:19
Feature Flag Cleanup Example
class UsefulClass {
public function primaryMethod() {
// Doing stuff
// Doing stuff
doNewMethod1();
doNewMethod2();