Skip to content

uab-cs/class_notes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

class_notes

Gem Version

make your classes take notes

install:

gem install class_notes

usage:

require 'class_notes'

class SimpleMath
  def add(a:, b:)
    a + b
  end

  def add_4(a:,b:,c:,d:)
    add(a: add(a: a, b: b), b: add(a: c, b: d) )
  end
end

notebook = ClassNotes.jot(SimpleMath).new
notebook.add_4(a: 1, b: 2, c: 3, d: 4) # => 10
puts notebook.notes
SimpleMathNotebook:
  children:
    add_4:
      args:
        a: 1
        b: 2
        c: 3
        d: 4
      children:
        add:
          args:
            a: 1
            b: 2
          results:
            0: 3
        add:
          args:
            a: 3
            b: 4
          results:
            0: 7
        add:
          args:
            a: 3
            b: 7
          results:
            0: 10
      results:
        0: 10

docs:

http://www.rubydoc.info/gems/class_notes

About

make your classes take notes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages