Class: Jade::Type::Function
- Inherits:
-
Data
- Object
- Data
- Jade::Type::Function
- Includes:
- Base
- Defined in:
- lib/jade/type/function.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args
3 4 5 |
# File 'lib/jade/type/function.rb', line 3 def args @args end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type
3 4 5 |
# File 'lib/jade/type/function.rb', line 3 def return_type @return_type end |
Instance Method Details
#to_s ⇒ Object
6 7 8 9 10 |
# File 'lib/jade/type/function.rb', line 6 def to_s args .map(&:to_s).join(', ') .then { "(#{it})"} + " -> " + return_type.to_s end |
#unbound_vars ⇒ Object
12 13 14 15 |
# File 'lib/jade/type/function.rb', line 12 def unbound_vars (args.flat_map(&:unbound_vars) + return_type.unbound_vars) .to_set.to_a end |