Sha256: 94d0633f2ece5dd0b3178828ef3c0f16c9840fb2f527a9e3241eed5f850aa414

Contents?: true

Size: 609 Bytes

Versions: 5

Compression:

Stored size: 609 Bytes

Contents

module Daengine
  class ContentServiceProcessor

    def self.is_windows?
      processor, platform, *rest = RUBY_PLATFORM.split("-")
      platform =~ /mswin/ || platform =~ /mingw/
    end

    def self.process_orderable
      result = DigitalAsset.all
      cs = ContentServiceResource.find_all
      result.each{ |da| set_orderable(da,cs)}
    end

    def self.set_orderable(da,cs)
      cs.each do |c| 
        if da.sami_code == c.attributes[:samiCode] 
          da.orderable = c.attributes[:orderable]
          da.save!
          break
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
daengine-0.2.11 lib/daengine/content_service_processor.rb
daengine-0.2.10 lib/daengine/content_service_processor.rb
daengine-0.2.9 lib/daengine/content_service_processor.rb
daengine-0.2.8 lib/daengine/content_service_processor.rb
daengine-0.2.7 lib/daengine/content_service_processor.rb