28.05.2013 Views

Really large scale systems configuration

Really large scale systems configuration

Really large scale systems configuration

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chef: The method_missing problem<br />

node.foo('bar')<br />

● Ruby: “Is there a method foo() ?”<br />

● Chef: “If not, is there an attribute foo ?”<br />

● “If not, create; assign bar”<br />

● OK for...<br />

node['foo'] = 'bar'<br />

node.foo = bar<br />

● But imagine:<br />

node.has_key('foo') # want has_key?()

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!