Module: RedParse::Stackable

Included in:
Node, Token
Defined in:
lib/redparse/node.rb

Defined Under Namespace

Modules: Meta

Instance Method Summary collapse

Instance Method Details

#identity_nameObject

of Meta



149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/redparse/node.rb', line 149

def identity_name
  k=self.class
  list=[k.name]
  list.concat k.boolean_identity_params.map{|(bip,*)| bip if send(bip) }.compact
  list.concat k.identity_params.map{|(ip,variations)|
    val=send(ip)
    variations.include? val or fail "identity_param #{k}##{ip} unexpected value #{val.inspect}"
    [ip,val] 
  }.flatten
  result=list.join("_")
  return result
end