MyObject = checkCondition: (num) -> return true if num is 5
getSum: (num) -> total = 0 total += i for i in [1..num] when @checkCondition i total