Giter VIP home page Giter VIP logo

easyrules-tutorials-groovy's Introduction

EasyRules Tutorials Groovy

EasyRules tutorials using Groovy beans with a Gradle build script.

Usage:

NB: Use '--quiet' or '-q' to supress Gradle build output lines

./gradlew usage
   Prints the following usage to the console

./gradlew FizzBuzz
   Baseline FizzBuzz using code. (From: http://wiki.c2.com/?FizzBuzzTest)
   Prints the integers from 1 to 100.  For multiples of 3, print 'Fizz' instead 
   of the integer and for the multiples of 5, print 'Buzz'. For integers which are 
   multiples of both 3 and 5, print 'FizzBuzz'.
   
./gradlew FizzBuzzER
   FizzBuzz implementation using EasyRules.
   
./gradlew Simple
   Very simple EasyRules examples with one, always true, rule.
   
./gradlew HelloWorld -q
   Obligatory 'Hello, world' example where the input is evaluated by a rule.
   
./gradlew Shop -P person=Tommy -P age=15
   Rule to evaluate drinking age (US 21); Nmae and age can be passed in via the command line
   or system properties; Default is 'Tom' at age '17'.

./gradlew Fire -q
    Copied from DROOLS examples. Create some rooms with sprinklers, start some fires.
    The sprinklers will turn on and an alarm will be raised to notify the Fire Department.
    Put out the fires, the sprinklers will turn off and the alarm will be silenced.

./gradlew Discount -P transactions=5 -q
    Copied from DROOLS examples. A customer selects and returns various items. A discount
    is applied or removed depending on the merchandise total at the end of each transaction. 
    Transactions are generated randomly.

./gradlew HonestPolitician
    Copied from DROOLS examples.Initialize with honest politicians and the people rejoice. 
    Introduce big corporationsand corrupt each politician.  How the people feel now?
          
./gradlew clean
 Remove all reports and artifacts from './build'

Windows Users - use gradlew instead of ./gradlew to run each tutorial.

easyrules-tutorials-groovy's People

Contributors

will-gilbert avatar

Watchers

James Cloos avatar Eric Lu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.