Guest User

Untitled

a guest
Jun 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Financing::FINANCINGS.each do |method|
  2. define_method method do
  3. if current_period && current_period != :nil
  4. instance_variable_defined?("@#{method}") ? nil : instance_variable_set("@#{method}", Hash.new)
  5. instance_variable_get("@#{method}")[current_period.id] ||= current_period.send(method)
  6. else
  7. 0.0
  8. end
  9. end
  10. end
Add Comment
Please, Sign In to add comment