mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
don't repeat yourself
This commit is contained in:
parent
b3bd8f9275
commit
97f898e674
1 changed files with 13 additions and 12 deletions
25
lib/aasm.rb
25
lib/aasm.rb
|
@ -1,17 +1,18 @@
|
|||
require 'ostruct'
|
||||
|
||||
# TODO shorten this [thorsten, 2011-12-20]
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'version')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'errors')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'base')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'instance_base')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'transition')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'event')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'state')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'localizer')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'state_machine')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'persistence')
|
||||
require File.join(File.dirname(__FILE__), 'aasm', 'aasm')
|
||||
%w(
|
||||
version
|
||||
errors
|
||||
base
|
||||
instance_base
|
||||
transition
|
||||
event
|
||||
state
|
||||
localizer
|
||||
state_machine
|
||||
persistence
|
||||
aasm
|
||||
).each { |file| require File.join(File.dirname(__FILE__), 'aasm', file) }
|
||||
|
||||
# load the deprecated methods and modules
|
||||
Dir[File.join(File.dirname(__FILE__), 'aasm', 'deprecated', '*.rb')].sort.each { |f| require File.expand_path(f) }
|
||||
|
|
Loading…
Reference in a new issue