Module: CML::ParserLogic

Included in:
Parser
Defined in:
lib/cml/logic.rb

Overview

Logic behavior included in CML::Parser

Instance Method Summary collapse

Instance Method Details

#has_grouped_logic?Boolean

Returns:

  • (Boolean)


132
133
134
# File 'lib/cml/logic.rb', line 132

def has_grouped_logic?
  self.logic_tree.has_grouped_logic?
end

#has_liquid_logic?Boolean

Returns:

  • (Boolean)


136
137
138
# File 'lib/cml/logic.rb', line 136

def has_liquid_logic?
  self.logic_tree.has_liquid_logic?
end

#has_nested_logic?Boolean

Returns:

  • (Boolean)


128
129
130
# File 'lib/cml/logic.rb', line 128

def has_nested_logic?
  self.logic_tree.max_depth > 2
end

#logic_treeObject



140
141
142
# File 'lib/cml/logic.rb', line 140

def logic_tree
  @logic_tree ||= CML::LogicTree.new( self )
end