Class: Fukubukuro::FunctionDefinition
- Defined in:
- lib/amber/fukubukuro.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#signature ⇒ Object
Returns the value of attribute signature.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
612 613 614 |
# File 'lib/amber/fukubukuro.rb', line 612 def block @block end |
#signature ⇒ Object
Returns the value of attribute signature.
612 613 614 |
# File 'lib/amber/fukubukuro.rb', line 612 def signature @signature end |
Class Method Details
.new(signature, block) ⇒ Object
613 614 615 616 617 618 619 620 |
# File 'lib/amber/fukubukuro.rb', line 613 def self.new signature, block function_definition = super() do Function.new signature, block end function_definition.signature = signature function_definition.block = block function_definition end |
Instance Method Details
#inspect ⇒ Object
621 622 623 |
# File 'lib/amber/fukubukuro.rb', line 621 def inspect 'FunctionDefintion(%p) { %p }' % [signature, block] end |
#pretty_print(q) ⇒ Object
624 625 626 627 628 629 630 631 |
# File 'lib/amber/fukubukuro.rb', line 624 def pretty_print q q.group 2, 'FunctionDefintion(', ')' do q.pp signature end q.group 2, ' { ', ' }' do q.pp block end end |