Class: Gobstones::Lang::HayBolitas
- Inherits:
-
OneArgExpression
- Object
- Expression
- OneArgExpression
- Gobstones::Lang::HayBolitas
- Defined in:
- lib/gobstones/lang/expressions/primitive_functions.rb
Instance Attribute Summary
Attributes inherited from OneArgExpression
Instance Method Summary collapse
Methods inherited from OneArgExpression
#equality_attributes, #initialize, #with_evaluated_argument_in
Methods inherited from Expression
Methods included from EqualityDefinition
Constructor Details
This class inherits a constructor from Gobstones::Lang::OneArgExpression
Instance Method Details
#evaluate(context) ⇒ Object
21 22 23 24 25 |
# File 'lib/gobstones/lang/expressions/primitive_functions.rb', line 21 def evaluate(context) with_evaluated_argument_in(context) do |result| context.head.are_there_balls?(result).to_gbs_bool end end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/gobstones/lang/expressions/primitive_functions.rb', line 27 def to_s 'hayBolitas() expression' end |