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