Class: ONIX::TagNameMatcher

Inherits:
Struct
  • Object
show all
Defined in:
lib/onix/subset.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#tag_nameObject

Returns the value of attribute tag_name

Returns:

  • (Object)

    the current value of tag_name



17
18
19
# File 'lib/onix/subset.rb', line 17

def tag_name
  @tag_name
end

Instance Method Details

#===(target) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/onix/subset.rb', line 18

def ===(target)
  if target.element?
    name = target.name
    name.casecmp(tag_name) == 0 or ShortToRef.names[name] == tag_name
  else
    false
  end
end