class Sortviz::Algorithms

Public Class Methods

author(author) click to toggle source
# File lib/sortviz/algorithms.rb, line 21
def author(author)
  plugins.last[:author] = author
end
define(algorithm_name, &block) click to toggle source
# File lib/sortviz/algorithms.rb, line 4
def define(algorithm_name, &block)
  plugins << { display_name: algorithm_name }
  instance_eval &block
end
name(name) click to toggle source
# File lib/sortviz/algorithms.rb, line 17
def name(name)
  plugins.last[:name] = name
end
plugins() click to toggle source
# File lib/sortviz/algorithms.rb, line 9
def plugins
  @plugins ||= []
end
sort(block) click to toggle source
# File lib/sortviz/algorithms.rb, line 13
def sort(block)
  Algorithms.plugins.last[:sort] = block
end
url(link) click to toggle source
# File lib/sortviz/algorithms.rb, line 25
def url(link)
  plugins.last[:url] = link
end