Class: JMESPath::Nodes::TypeFunction Private
- Includes:
- TypeChecker
- Defined in:
- lib/jmespath/nodes/function.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary
Constants included from TypeChecker
JMESPath::Nodes::TypeChecker::ARRAY_TYPE, JMESPath::Nodes::TypeChecker::BOOLEAN_TYPE, JMESPath::Nodes::TypeChecker::EXPRESSION_TYPE, JMESPath::Nodes::TypeChecker::NULL_TYPE, JMESPath::Nodes::TypeChecker::NUMBER_TYPE, JMESPath::Nodes::TypeChecker::OBJECT_TYPE, JMESPath::Nodes::TypeChecker::STRING_TYPE, JMESPath::Nodes::TypeChecker::TYPE_NAMES
Constants inherited from Function
Instance Method Summary collapse
- #call(args) ⇒ Object private
Methods included from TypeChecker
Methods inherited from Function
create, #initialize, #optimize, #visit
Methods inherited from Node
#chains_with?, #optimize, #visit
Constructor Details
This class inherits a constructor from JMESPath::Nodes::Function
Instance Method Details
#call(args) ⇒ 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.
302 303 304 305 306 307 308 |
# File 'lib/jmespath/nodes/function.rb', line 302 def call(args) if args.count == 1 TYPE_NAMES[get_type(args.first)] else return maybe_raise Errors::InvalidArityError, 'function type() expects one argument' end end |