0
I Use This!
Activity Not Available

Project Summary

Usually reports are generated with the restrictive assumption that all search conditions must be true. It's hard to present a user interface that lets real people create complex sentential logic. The interface must be easily visualized and understood, and must import and export well-formed strings. Ethan Pooley and I prototyped this method in 2004, and this plugin is my Ruby on Rails port.

Once the user has created a sentential logic string, you still need to do something with it. The Ruby API lets you easily parse the string into a logical tree, then either evaluate the truth of the tree or convert the tree into SQL.

For example:

phrase = UserLogic::Phrase.new(%("f" or ("t" and "t")))
phrase.true? {|atom| atom == "t"}
=> true

phrase = UserLogic::Phrase.new(%("a" or ("b" and "d")))
phrase.to_sql do |atom|
case atom
when 'a': 'alpha'
when 'b': 'beta'
when 'd': 'delta'
end
end
=> 'alpha OR (beta AND delta)'

Tags

logic plugin rubyonrails search ui

In a Nutshell, userlogic...

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

MIT License
Permitted

Commercial Use

Modify

Distribute

Sub-License

Private Use

Forbidden

Hold Liable

Required

Include Copyright

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

All Licenses

This Project has No vulnerabilities Reported Against it

Did You Know...

  • ...
    Black Duck offers a free trial so you can discover if there are open source vulnerabilities in your code
  • ...
    search using multiple tags to find exactly what you need
  • ...
    there are over 3,000 projects on the Open Hub with security vulnerabilities reported against them
  • ...
    learn about Open Hub updates and features on the Open Hub blog

 No code available to analyze

Open Hub computes statistics on FOSS projects by examining source code and commit history in source code management systems. This project has no code locations, and so Open Hub cannot perform this analysis

Is this project's source code hosted in a publicly available repository? Do you know the URL? If you do, click the button below and tell us so that Open Hub can generate statistics! It's fast and easy - try it and see!

Add a code location

Community Rating

Be the first to rate this project
Click to add your rating
   Spinner
Review this Project!
Sample ohloh analysis