Class: Jade::Frontend::PatternAnalysis::Constructor
- Inherits:
-
Data
- Object
- Data
- Jade::Frontend::PatternAnalysis::Constructor
- Defined in:
- lib/jade/frontend/pattern_analysis.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
17 18 19 |
# File 'lib/jade/frontend/pattern_analysis.rb', line 17 def args @args end |
#constructor ⇒ Object (readonly)
Returns the value of attribute constructor
17 18 19 |
# File 'lib/jade/frontend/pattern_analysis.rb', line 17 def constructor @constructor end |
Instance Method Details
#to_s ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/jade/frontend/pattern_analysis.rb', line 20 def to_s if constructor.start_with?('Tuple.') "(#{args.map(&:to_s).join(', ')})" else name = constructor.split('.').last args.empty? ? name : "#{name}(#{args.map(&:to_s).join(', ')})" end end |
#wildcard? ⇒ Boolean
18 |
# File 'lib/jade/frontend/pattern_analysis.rb', line 18 def wildcard?; false; end |