Method: Slim::LogicLess#initialize
- Defined in:
- lib/slim/logic_less/filter.rb
#initialize(opts = {}) ⇒ LogicLess
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of LogicLess.
14 15 16 17 18 19 20 21 22 |
# File 'lib/slim/logic_less/filter.rb', line 14 def initialize(opts = {}) super access = [[:dictionary_access]].flatten.compact access.each do |type| raise ArgumentError, "Invalid dictionary access #{type.inspect}" unless DEFAULT_ACCESS_ORDER.include?(type) end raise ArgumentError, 'Option dictionary access is missing' if access.empty? @access = access.inspect end |