File: rantly.rb

package info (click to toggle)
ruby-rantly 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 196 kB
  • sloc: ruby: 832; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 280 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$LOAD_PATH.unshift(File.dirname(__FILE__)) unless
  $LOAD_PATH.include?(File.dirname(__FILE__)) || $LOAD_PATH.include?(__dir__)

class Rantly
end

require 'rantly/generator'

def Rantly(n = 1, &block)
  if n > 1
    Rantly.map(n, &block)
  else
    Rantly.value(&block)
  end
end