Sha256: 3da638b1b9416958cd4b74a18a8dca7102488cc5b55810013a00e9fce91d658d

Contents?: true

Size: 550 Bytes

Versions: 3

Compression:

Stored size: 550 Bytes

Contents

module Nanoc
  class Plugin

    class << self
      attr_accessor :_identifiers
    end

    def self.identifiers(*identifiers)
      self._identifiers = [] unless instance_variables.include?('@_identifiers')
      identifiers.empty? ? self._identifiers || [] : self._identifiers = (self._identifiers || []) + identifiers
    end

    def self.identifier(identifier=nil)
      self._identifiers = [] unless instance_variables.include?('@_identifiers')
      identifier.nil? ? self.identifiers.first : self.identifiers(identifier)
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nanoc-2.0.2 lib/nanoc/base/plugin.rb
nanoc-2.0.4 lib/nanoc/base/plugin.rb
nanoc-2.0.3 lib/nanoc/base/plugin.rb