Class: NaiveCalculator::Environment::Function

Inherits:
Struct
  • Object
show all
Defined in:
lib/naive_calculator/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#arityObject

Returns the value of attribute arity

Returns:

  • (Object)

    the current value of arity



3
4
5
# File 'lib/naive_calculator/environment.rb', line 3

def arity
  @arity
end

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



3
4
5
# File 'lib/naive_calculator/environment.rb', line 3

def body
  @body
end

Instance Method Details

#to_sObject



4
5
6
# File 'lib/naive_calculator/environment.rb', line 4

def to_s
  "function/#{arity}"
end