Sha256: 7b983e4d197f3c7ff3da6301dd9cdd1b24a3738e39c8ef83176879a99522e2e0

Contents?: true

Size: 213 Bytes

Versions: 22

Compression:

Stored size: 213 Bytes

Contents

# frozen_string_literal: true

class Document
  class Decorator < Azeroth::Decorator
    expose :name
    expose :reference, if: proc(&:magic?)

    def magic?
      reference&.match(/^X-MAGIC/)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
azeroth-1.0.0 spec/dummy/app/models/document/decorator.rb
azeroth-0.10.1 spec/dummy/app/models/document/decorator.rb
azeroth-0.10.0 spec/dummy/app/models/document/decorator.rb
azeroth-0.9.0 spec/dummy/app/models/document/decorator.rb
azeroth-0.8.2 spec/dummy/app/models/document/decorator.rb
azeroth-0.8.1 spec/dummy/app/models/document/decorator.rb
azeroth-0.8.0 spec/dummy/app/models/document/decorator.rb
azeroth-0.7.4 spec/dummy/app/models/document/decorator.rb
azeroth-0.7.3 spec/dummy/app/models/document/decorator.rb
azeroth-0.7.2 spec/dummy/app/models/document/decorator.rb
azeroth-0.7.1 spec/dummy/app/models/document/decorator.rb
azeroth-0.7.0 spec/dummy/app/models/document/decorator.rb
azeroth-0.6.5 spec/dummy/app/models/document/decorator.rb
azeroth-0.6.4 spec/dummy/app/models/document/decorator.rb
azeroth-0.6.3 spec/dummy/app/models/document/decorator.rb
azeroth-0.6.2 spec/dummy/app/models/document/decorator.rb
azeroth-0.6.1 spec/dummy/app/models/document/decorator.rb
azeroth-0.6.0 spec/dummy/app/models/document/decorator.rb
azeroth-0.5.0 spec/dummy/app/models/document/decorator.rb
azeroth-0.4.0 spec/dummy/app/models/document/decorator.rb