Class: Pione::Lang::BooleanSequence
- Inherits:
-
OrdinalSequence
- Object
- StructX
- Expr
- Sequence
- OrdinalSequence
- Pione::Lang::BooleanSequence
- Defined in:
- lib/pione/lang/boolean.rb
Overview
BooleanSequence is a class for sequences of boolean.
Instance Method Summary collapse
Methods inherited from OrdinalSequence
#empty, #fold, fold, #fold2, fold2, #inspect, make_piece, #map, map, map2, #map2, map3, #map3, #map_by, of
Methods inherited from Sequence
#assertive?, #attribute, #concat, #each, #eval, index_type, inherited, piece_class, piece_classes, #push, #set_annotation_type, set_index_type, #update_pieces, void, #void?
Methods included from Callable
Methods included from Util::Positionable
#line_and_column, #pos, #set_source_position
Methods inherited from Expr
#eval, #eval!, inherited, pione_type, set_pione_type, #to_s
Instance Method Details
#textize ⇒ Object
17 18 19 |
# File 'lib/pione/lang/boolean.rb', line 17 def textize "(<b>%s)" % pieces.map {|piece| piece.value}.join("|") end |
#value ⇒ Object
13 14 15 |
# File 'lib/pione/lang/boolean.rb', line 13 def value @__value__ ||= pieces.inject(true){|b, piece| b and piece.value} end |