Class: Fukubukuro::ConditionalLoop

Inherits:
Statement show all
Defined in:
lib/amber/fukubukuro.rb

Direct Known Subclasses

DoWhileLoop, WhileLoop

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block.



252
253
254
# File 'lib/amber/fukubukuro.rb', line 252

def block
  @block
end

#conditionObject

Returns the value of attribute condition.



252
253
254
# File 'lib/amber/fukubukuro.rb', line 252

def condition
  @condition
end

Instance Method Details

#inspectObject



253
254
255
# File 'lib/amber/fukubukuro.rb', line 253

def inspect
  self.class.inspect + '(%p) {}' % [condition, block]
end

#pretty_print(q) ⇒ Object



256
257
258
259
260
261
262
263
264
# File 'lib/amber/fukubukuro.rb', line 256

def pretty_print q
  q.text self.class.inspect
  q.group 2, '(', ')' do
    q.pp condition
  end
  q.group 2, ' { ', ' }' do
    q.pp block
  end
end