Class: Fastererer::Primitive
- Inherits:
-
Object
- Object
- Fastererer::Primitive
- Defined in:
- lib/fastererer/method_call.rb
Instance Attribute Summary collapse
-
#element ⇒ Object
readonly
Returns the value of attribute element.
Instance Method Summary collapse
- #array? ⇒ Boolean
- #hash? ⇒ Boolean
-
#initialize(node) ⇒ Primitive
constructor
A new instance of Primitive.
- #range? ⇒ Boolean
Constructor Details
#initialize(node) ⇒ Primitive
Returns a new instance of Primitive.
185 186 187 |
# File 'lib/fastererer/method_call.rb', line 185 def initialize(node) @element = node end |
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
183 184 185 |
# File 'lib/fastererer/method_call.rb', line 183 def element @element end |
Instance Method Details
#array? ⇒ Boolean
193 194 195 |
# File 'lib/fastererer/method_call.rb', line 193 def array? element.is_a?(Prism::ArrayNode) end |
#hash? ⇒ Boolean
197 198 199 |
# File 'lib/fastererer/method_call.rb', line 197 def hash? element.is_a?(Prism::HashNode) end |
#range? ⇒ Boolean
189 190 191 |
# File 'lib/fastererer/method_call.rb', line 189 def range? element.is_a?(Prism::RangeNode) end |