Skip to content

polyfox/moon-memoized

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moon Memoized

Build Status Test Coverage Inline docs Code Climate

Usage

class MyObject
  extend Moon::Memoized

  memoize_attr(:name, 'Eggo')
  memoize_attr(:age) { 18 }
  memoize_attr(:name_length) { name.length }
end

obj = MyObject.new
obj.name #=> Eggo
obj.age #=> 18
obj.name_length #=> 4

About

Simple implementation of memoized attributes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages