Module: Mayu::VDOM::Interfaces::Descriptor

Extended by:
T::Helpers, T::Sig
Included in:
Descriptor
Defined in:
lib/mayu/vdom/interfaces.rb

Defined Under Namespace

Modules: Factory

Constant Summary collapse

TEXT =
:TEXT
COMMENT =
:COMMENT

Instance Method Summary collapse

Instance Method Details

#childrenObject



118
# File 'lib/mayu/vdom/interfaces.rb', line 118

def children = props[:children]

#comment?Boolean

Returns:

  • (Boolean)


92
# File 'lib/mayu/vdom/interfaces.rb', line 92

def comment? = type == COMMENT

#component?Boolean

Returns:

  • (Boolean)


98
99
# File 'lib/mayu/vdom/interfaces.rb', line 98

def component?
end

#component_classObject



127
128
# File 'lib/mayu/vdom/interfaces.rb', line 127

def component_class
end

#element?Boolean

Returns:

  • (Boolean)


95
# File 'lib/mayu/vdom/interfaces.rb', line 95

def element? = type.is_a?(Symbol)

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


155
156
# File 'lib/mayu/vdom/interfaces.rb', line 155

def eql?(other)
end

#has_children?Boolean

Returns:

  • (Boolean)


121
# File 'lib/mayu/vdom/interfaces.rb', line 121

def has_children? = children.any?

#hashObject



147
148
149
# File 'lib/mayu/vdom/interfaces.rb', line 147

def hash
  [type, slot, key, type == :input && props[:type]].hash
end

#itselfObject



131
# File 'lib/mayu/vdom/interfaces.rb', line 131

def itself = self

#keyObject



110
111
# File 'lib/mayu/vdom/interfaces.rb', line 110

def key
end

#propsObject



106
107
# File 'lib/mayu/vdom/interfaces.rb', line 106

def props
end

#same?(other) ⇒ Boolean

Returns:

  • (Boolean)


161
162
# File 'lib/mayu/vdom/interfaces.rb', line 161

def same?(other)
end

#slotObject



114
115
# File 'lib/mayu/vdom/interfaces.rb', line 114

def slot
end

#textObject



124
# File 'lib/mayu/vdom/interfaces.rb', line 124

def text = props[:text_content].to_s

#text?Boolean

Returns:

  • (Boolean)


89
# File 'lib/mayu/vdom/interfaces.rb', line 89

def text? = type == TEXT

#then {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



141
# File 'lib/mayu/vdom/interfaces.rb', line 141

def then(&block) = yield self

#typeObject



102
103
# File 'lib/mayu/vdom/interfaces.rb', line 102

def type
end