Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Adds some important face-making possibilities to Ruby code.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 History.txt
Octocat-spinner-32 License.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 nO_op.gemspec
README.md

What?

I think this question can be best answered by a few contrived examples of what real-world use might look like.

# This convoluted code makes sure that the @kind is "credit_card" or
# "purchase_order", and if it's not "credit_card", then the customer
# must not have a payment_method of "credit_card".
if [ 'credit_card', 'purchase_order' ].include?(@kind) && (@kind == 'credit_card' || current_user.customer.payment_method == 'purchase_order')
  @order = ((@kind == 'credit_card') ? CreditCardOrder : PurchaseOrder).new(params[:order])

  O_o
end

or

current_user.prelude_web_user.shipping_addresses.reject { |a| a.to_s.blank? }.sort_by(&:to_s).O_o.collect {|a| [ a.to_s, a.id ] }

I like to think of that second usage as a judgemental tap.

Also available:

  • o_O
  • O.o
  • o.O

Contributions

You want to contribute to this? Really? Y'know, you should check out my 'truthy' project, too.

License

nO_op uses the MIT license. Read License.txt if you care.

Something went wrong with that request. Please try again.