Class: Limber::TagLayoutTemplate

Inherits:
Sequencescape::TagLayoutTemplate
  • Object
show all
Defined in:
app/models/limber/tag_layout_template.rb

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Instance Method Details

#coerceObject

Performs the coercion of this instance so that it behaves appropriately given the direction and walking algorithm information.



6
7
8
9
10
11
12
13
14
# File 'app/models/limber/tag_layout_template.rb', line 6

def coerce
  extend("limber/tag_layout_template/in_#{direction.gsub(/\s+/, '_')}s".camelize.constantize)
  extend("limber/tag_layout_template/walk_#{walking_by.gsub(/\s+/, '_')}".camelize.constantize)
rescue NameError => e
  Rails.logger.warn("Unrecognised layout options: #{e.message}")
  extend Unsupported
ensure
  self
end