Class DS::Substitution
In: AS.dat.rb
Parent: Hash

Methods

compose   html   inspect  

Public Instance methods

[Source]

     # File AS.dat.rb, line 430
430:    def compose(second)
431:       composition = self
432:       each { |k, v| composition[k] = v.apply(second) }
433:       return composition.merge!(second)
434:    end

[Source]

     # File AS.dat.rb, line 443
443:    def html
444:       keys.length==0 ? '' : # σ
445:       '{'.color('substitution') + ' ' +
446:       collect{ |k,v| v.html + '/' + k.color('variable') }.join(", ") +
447:       ' ' + '}'.color('substitution')
448:    end

[Source]

     # File AS.dat.rb, line 437
437:    def inspect
438:       keys.length==0 ? 'empty' :
439:       collect{ |k,v| v.inspect + '/' + k }.join(", ")
440:    end

[Validate]