Class: Jade::Type::Application
- Inherits:
-
Data
- Object
- Data
- Jade::Type::Application
- Includes:
- Base
- Defined in:
- lib/jade/type/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/application.rb', line 3 def args @args end |
#constructor ⇒ Object (readonly)
Returns the value of attribute constructor
3 4 5 |
# File 'lib/jade/type/application.rb', line 3 def constructor @constructor end |
Instance Method Details
#to_s ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/jade/type/application.rb', line 6 def to_s return constructor.to_s if args.empty? if constructor.name.start_with?('Tuple.Tuple') return "(#{args.map(&:to_s).join(', ')})" end "#{constructor.to_s}(#{args.map(&:to_s).join(", ")})" end |
#unbound_vars ⇒ Object
16 17 18 |
# File 'lib/jade/type/application.rb', line 16 def unbound_vars constructor.unbound_vars + args.flat_map(&:unbound_vars) end |