Class: Antlers::AntlerNode
- Inherits:
-
Object
- Object
- Antlers::AntlerNode
- Defined in:
- lib/interfaces/antler_node.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Consider instance a value object on comparison.
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name:) ⇒ AntlerNode
constructor
A new instance of AntlerNode.
- #render(current_binding: nil, parent_binding: nil, slot_node: nil, namespace: nil) ⇒ Object
Constructor Details
#initialize(name:) ⇒ AntlerNode
Returns a new instance of AntlerNode.
7 8 9 |
# File 'lib/interfaces/antler_node.rb', line 7 def initialize(name:) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/interfaces/antler_node.rb', line 5 def name @name end |
Instance Method Details
#==(other) ⇒ Object
Consider instance a value object on comparison.
16 |
# File 'lib/interfaces/antler_node.rb', line 16 def ==(other) = other.class == self.class |
#eql?(other) ⇒ Boolean
17 |
# File 'lib/interfaces/antler_node.rb', line 17 def eql?(other) = self == other |
#hash ⇒ Object
18 |
# File 'lib/interfaces/antler_node.rb', line 18 def hash = [self.class].hash |
#render(current_binding: nil, parent_binding: nil, slot_node: nil, namespace: nil) ⇒ Object
11 12 13 |
# File 'lib/interfaces/antler_node.rb', line 11 def render(current_binding: nil, parent_binding: nil, slot_node: nil, namespace: nil) raise NotImplementedError end |