Skip to content

Conversation

@ellesuzuki
Copy link

was unclear as to what type of method protects? was supposed to be, so made as plain old method.

@jwo
Copy link
Member

jwo commented Feb 19, 2013

So the idea is that when you're defining your class, you won't need to be tied to the john-conner and sarah-conner implementation. for example, my kids are named Hank and Jack. so maybe I'd me:

class Jwo
  include Terminatorable

  likes_to_protect [:hank, :jack]
end

you should be able to be like:

Jwo.new.protects?(:hank)
=> true

Jwo.new.protects?(:random_person)
=> false

So: items:

  1. the protects should be in the Terminatorable module
  2. the protects should check a variable your module is creating
  3. the likes_to_protect should set the variable in #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants