This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TestState | |
InvalidStateError = Class.new(RuntimeError) | |
def get_state stately | |
Object.const_get("TestState::#{stately.state}").new stately | |
rescue NameError | |
raise InvalidStateError, "Invalid State '#{stately.state}'" | |
end | |
ACTIONS = [:start, :stop] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#require 'rubygems' | |
require 'pp' | |
#require 'ap' # Awesome Print | |
class Object | |
# expects [ [ symbol, *args ], ... ] | |
def recursive_send(*args) | |
args.inject(self) { |obj, m| obj.send(m.shift, *m) } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |