Parse and recognize expressions for budgeteer
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
grammar
lib
spec
LICENSE
README.rdoc
Rakefile
grammatic.gemspec

README.rdoc

GRAMMATIC. Parse and Recognize expressions for Budgeteer

Grammatic is a simple gem that recognize different types of grammatic for budgeteer and parse them. Each time that you call the method 'parse' you will get a hash with all parts of that string or you get an exception when the expression is not valid.

require 'grammatic'
Grammatic.parse("@savings super food 100 some groceries for tonight")
#=> { :account => "@savings", :tags => "super food", :amount => 100, :description => "some groceries for tonight" }

Grammatic.parse("invalid expression")
#=> Grammatic::InvalidExpression: The expression is not valid