Class names are CamelCase.
Methods and variables are snake_case.
Methods with a ? suffix will return a boolean.
| # memoized fibonacci in Ruby | |
| class Fibber | |
| attr_accessor :hash | |
| def initialize | |
| @hash = {} | |
| end | |
| def memo_fib(n) | |
| for number in 0..n | |
| if number < 2 | |
| @hash[number] = number |
| attachments: parent_id, asset_id | |
| domain_names: organisation_id | |
| event_memberships: user_id, event_id | |
| events: editor_id | |
| group_actions: user_id, group_id | |
| groups: user_id | |
| icons: parent_id | |
| invitations: sender_id | |
| legacy_actions: item_upon_id | |
| news_items: author_id |