Module: CEML::Lexer::Roles2

Defined in:
lib/ceml/lang/tt/lexer.rb

Instance Method Summary collapse

Instance Method Details

#[](x) ⇒ Object



1501
# File 'lib/ceml/lang/tt/lexer.rb', line 1501

def [](x); list.detect{ |r| r.name.to_sym == x }; end

#listObject



1496
1497
1498
# File 'lib/ceml/lang/tt/lexer.rb', line 1496

def list
    [role] + more.elements.map{ |e| e.role }
end

#maxObject



1503
# File 'lib/ceml/lang/tt/lexer.rb', line 1503

def max;   list.map(&:max).inject(0, &:+);        end

#minObject



1502
# File 'lib/ceml/lang/tt/lexer.rb', line 1502

def min;   list.map(&:min).inject(0, &:+);        end

#namesObject



1500
# File 'lib/ceml/lang/tt/lexer.rb', line 1500

def names; list.map{ |r| r.name.to_sym };         end