Class: Unific::Wildcard

Inherits:
Var
  • Object
show all
Includes:
Singleton
Defined in:
lib/unific.rb

Overview

The unique Unific wildcard variable

Instance Attribute Summary

Attributes inherited from Var

#name

Instance Method Summary collapse

Constructor Details

#initializeWildcard

The wildcard variable is named “_”



205
206
207
# File 'lib/unific.rb', line 205

def initialize #:nodoc:
  super "_"
end

Instance Method Details

#==(x) ⇒ Object

The wildcard variable matches any value



215
216
217
# File 'lib/unific.rb', line 215

def == x
  true
end

#to_sObject

The wildcard variable is presented as “_”



210
211
212
# File 'lib/unific.rb', line 210

def to_s
  "_"
end