Module: Bridgetown::Resource

Defined in:
bridgetown-core/lib/bridgetown-core/resource/base.rb,
bridgetown-core/lib/bridgetown-core/resource/relations.rb,
bridgetown-core/lib/bridgetown-core/resource/destination.rb,
bridgetown-core/lib/bridgetown-core/resource/transformer.rb,
bridgetown-core/lib/bridgetown-core/resource/taxonomy_term.rb,
bridgetown-core/lib/bridgetown-core/resource/taxonomy_type.rb,
bridgetown-core/lib/bridgetown-core/resource/permalink_processor.rb,
bridgetown-core/lib/bridgetown-core.rb

Defined Under Namespace

Classes: Base, Destination, PermalinkProcessor, Relations, TaxonomyTerm, TaxonomyType, Transformer

Class Method Summary collapse

Class Method Details

.register_extension(mod) ⇒ Object



380
381
382
383
384
385
386
387
# File 'bridgetown-core/lib/bridgetown-core.rb', line 380

def self.register_extension(mod)
  if mod.const_defined?(:LiquidResource)
    Bridgetown::Drops::ResourceDrop.include mod.const_get(:LiquidResource)
  end
  if mod.const_defined?(:RubyResource) # rubocop:disable Style/GuardClause
    Bridgetown::Resource::Base.include mod.const_get(:RubyResource)
  end
end