Module: Hexp::CssSelector::Named
Overview
Common behavior for parse tree elements that have a name
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
private
The name of this element.
Instance Method Summary collapse
-
#initialize(name) ⇒ Object
private
Shared constructor that sets a name.
-
#inspect ⇒ String
private
Return a representation convenient for debugging.
Instance Attribute Details
#name ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The name of this element
60 61 62 |
# File 'lib/hexp/css_selector.rb', line 60 def name @name end |
Instance Method Details
#initialize(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Shared constructor that sets a name
68 69 70 |
# File 'lib/hexp/css_selector.rb', line 68 def initialize(name) @name = name.freeze end |
#inspect ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return a representation convenient for debugging
77 78 79 |
# File 'lib/hexp/css_selector.rb', line 77 def inspect "<#{self.class.name.split('::').last} name=#{name}>" end |