Class: BitClust::Preprocessor::State
- Defined in:
- lib/bitclust/preprocessor.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
Instance Method Summary collapse
-
#initialize(is_processing, label) ⇒ State
constructor
A new instance of State.
- #next(is_processing, label) ⇒ Object
- #processing? ⇒ Boolean
- #samplecode? ⇒ Boolean
- #toplevel? ⇒ Boolean
Constructor Details
#initialize(is_processing, label) ⇒ State
Returns a new instance of State.
283 284 285 286 |
# File 'lib/bitclust/preprocessor.rb', line 283 def initialize(is_processing, label) @is_processing = is_processing @label = label end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
281 282 283 |
# File 'lib/bitclust/preprocessor.rb', line 281 def current @current end |
Instance Method Details
#next(is_processing, label) ⇒ Object
288 289 290 |
# File 'lib/bitclust/preprocessor.rb', line 288 def next(is_processing, label) State.new(@is_processing && is_processing, label) end |
#processing? ⇒ Boolean
296 297 298 |
# File 'lib/bitclust/preprocessor.rb', line 296 def processing? @is_processing end |
#samplecode? ⇒ Boolean
300 301 302 |
# File 'lib/bitclust/preprocessor.rb', line 300 def samplecode? @label == :samplecode end |
#toplevel? ⇒ Boolean
292 293 294 |
# File 'lib/bitclust/preprocessor.rb', line 292 def toplevel? @label == :toplevel end |