Saturday, February 21, 2015

class ProfitCalculator # ... (slightly) def dispatched_amount_maxdispatched_amount_max || = begin #

ADZ study notes Ruby / Rails, Startup, Life RSS Blog Archives About me
class ProfitCalculator # ... (slightly) def dispatched_amount_maxdispatched_amount_max || = begin # .... very heavy calculation end end def dispatched_amountdispatched_amount || = if dispatched_amount_max> 0 dispatched_amount_max * rand (0.. max_rate) eztv else current_profit end end def max_ratemax_rate || = # .... very heavy calculation end def current_profitcurrent_profit eztv || = # .... very heavy calculation end end regularization & single API entry rails notes - awesome_nested_set with activerecord-mysql- index-hint rails Notes - Object Design experience Recent Posts Make your slack team public late bird tickets start side project experience from writing and fund-raising plan - Avoid late bird guide because if logic ticket experience - users solve real problems hidden costs mood with "the way" of doing things to enhance the efficiency eztv of the power Categories DigitalOcean (2) activerecord (11) Entrepreneurship notes (7) nginx (4) return (0) KVM (2) Ubuntu (2) Shell (1) Gallery (1) Rails (28) VPS (4) ios (1) apache (1) deployment (2) gem (3) refactor (2) ruby (2) Rails-Sharing (1) learning (6) Year in Review (1) opensource (1)


No comments:

Post a Comment