Sha256: 9f3914bf4bb9735f91c74dda6b97279b27c79055fd6316cc0f42f3786d9aceeb

Contents?: true

Size: 508 Bytes

Versions: 5

Compression:

Stored size: 508 Bytes

Contents

require 'active_support/concern'
require 'ardm/ar/is/state_machine'

module Ardm
  module Ar
    module Is
      extend ActiveSupport::Concern

      module ClassMethods
        def is(target, options={}, &block)
          case target
          when :state_machine
            include Ardm::Ar::Is::StateMachine
            is_state_machine(options, &block)
          else
            STDERR.puts "TODO: #{self} is #{target.inspect}, #{options.inspect}"
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ardm-0.4.0.ar427 lib/ardm/ar/is.rb
ardm-0.4.0 lib/ardm/ar/is.rb
ardm-0.3.2 lib/ardm/ar/is.rb
ardm-0.3.1 lib/ardm/ar/is.rb
ardm-0.3.0 lib/ardm/ar/is.rb