Class: Kapusta::Compiler::Language::ConditionalBodyForm

Inherits:
Struct
  • Object
show all
Defined in:
lib/kapusta/compiler/language.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



23
24
25
# File 'lib/kapusta/compiler/language.rb', line 23

def body
  @body
end

#conditionObject

Returns the value of attribute condition

Returns:

  • (Object)

    the current value of condition



23
24
25
# File 'lib/kapusta/compiler/language.rb', line 23

def condition
  @condition
end

Instance Method Details

#body?Boolean

Returns:

  • (Boolean)


24
# File 'lib/kapusta/compiler/language.rb', line 24

def body? = !body.empty?