Sha256: 2e4fbf8f062eb7a02862d39f1c254bb62cadc41db7775cb333e3354265c87b56
Contents?: true
Size: 784 Bytes
Versions: 3
Compression:
Stored size: 784 Bytes
Contents
require 'grand_central/action' # Here we define an action taxonomy # # GrandCentral::Action # | # + Action -- Your top application-level action # | # + CounterAction # | | # | + Increment # | + Decrement # | # + SetName # This lets your store handle entire classes of actions with a single check, # which is very helpful in large apps with hundreds of actions: # # store = GrandCentral::Store.new(initial_state) do |state, action| # case action # when CounterAction # # Handles both Increment and Decrement # when SetName # # ... # else state # end # Create a top-level action Action = GrandCentral::Action.create CounterAction = Action.create do Increment = create Decrement = create end SetName = Action.with_attributes(:name)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
clearwater-roda-0.2.2 | templates/assets/js/actions.rb |
clearwater-roda-0.2.1 | templates/assets/js/actions.rb |
clearwater-roda-0.2.0 | templates/assets/js/actions.rb |