Sha256: 047a3713ce262d1b7c4848074f5d1bd62318194090022adcadf3bf2682307198

Contents?: true

Size: 894 Bytes

Versions: 14

Compression:

Stored size: 894 Bytes

Contents

module NetSuite
  module Support
    module Actions

      def self.included(base)
        base.send(:extend, ClassMethods)
      end

      module ClassMethods

        def actions(*args)
          args.each do |action|
            action(action)
          end
        end

        def action(name)
          case name
          when :get
            self.send(:include, NetSuite::Actions::Get::Support)
          when :add
            self.send(:include, NetSuite::Actions::Add::Support)
          when :delete
            self.send(:include, NetSuite::Actions::Delete::Support)
          when :update
            self.send(:include, NetSuite::Actions::Update::Support)
          when :initialize
            self.send(:include, NetSuite::Actions::Initialize::Support)
          else
            raise "Unknown action: #{name.inspect}"
          end
        end

      end

    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
netsuite-0.0.49 lib/netsuite/support/actions.rb
netsuite-0.0.48 lib/netsuite/support/actions.rb
netsuite-0.0.47 lib/netsuite/support/actions.rb
netsuite-0.0.45 lib/netsuite/support/actions.rb
netsuite-0.0.44 lib/netsuite/support/actions.rb
netsuite-0.0.43 lib/netsuite/support/actions.rb
netsuite-0.0.42 lib/netsuite/support/actions.rb
netsuite-0.0.41 lib/netsuite/support/actions.rb
netsuite-0.0.40 lib/netsuite/support/actions.rb
netsuite-0.0.39 lib/netsuite/support/actions.rb
netsuite-0.0.38 lib/netsuite/support/actions.rb
netsuite-0.0.37 lib/netsuite/support/actions.rb
netsuite-0.0.36 lib/netsuite/support/actions.rb
netsuite-0.0.35 lib/netsuite/support/actions.rb