Class: HasHelpers::TextNode
- Inherits:
-
Object
- Object
- HasHelpers::TextNode
- Includes:
- Attributes, UIAttributes
- Defined in:
- lib/has_helpers/utils/text_node.rb
Instance Attribute Summary collapse
-
#str ⇒ Object
(also: #to_s)
Returns the value of attribute str.
Attributes included from UIAttributes::HTMLAttributes
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(str, *args, **options, &block) ⇒ TextNode
constructor
A new instance of TextNode.
- #to_partial_path ⇒ Object
- #to_renderable ⇒ Object
Methods included from Attributes::GuardedAttributes
Methods included from UIAttributes::HTMLAttributes
Methods included from Attributes
Constructor Details
#initialize(str, *args, **options, &block) ⇒ TextNode
Returns a new instance of TextNode.
12 13 14 15 |
# File 'lib/has_helpers/utils/text_node.rb', line 12 def initialize(str, *args, **, &block) super(*args, **, &block) self.str = str.to_s end |
Instance Attribute Details
#str ⇒ Object Also known as: to_s
Returns the value of attribute str.
9 10 11 |
# File 'lib/has_helpers/utils/text_node.rb', line 9 def str @str end |
Instance Method Details
#==(other) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/has_helpers/utils/text_node.rb', line 25 def ==(other) case other when self.class to_s == other.to_s else super end end |
#to_partial_path ⇒ Object
21 22 23 |
# File 'lib/has_helpers/utils/text_node.rb', line 21 def to_partial_path "has_helpers/text_nodes/text_node" end |
#to_renderable ⇒ Object
17 18 19 |
# File 'lib/has_helpers/utils/text_node.rb', line 17 def to_renderable self end |