Class: Axiom::Function::String::Length
- Inherits:
-
Axiom::Function
- Object
- Axiom::Function
- Axiom::Function::String::Length
- Includes:
- Unary
- Defined in:
- lib/axiom/function/string/length.rb
Overview
A class representing a length function
Defined Under Namespace
Modules: Methods
Instance Attribute Summary
Attributes included from Operation::Unary
Class Method Summary collapse
-
.call(value) ⇒ Integer
Return the string length.
Instance Method Summary collapse
-
#type ⇒ Class<Attribute::Integer>
Return the type returned from #call.
Methods included from Unary
Methods included from Unary::Callable
Methods included from Operation::Unary
Methods inherited from Axiom::Function
extract_value, rename_attributes
Methods included from Visitable
Class Method Details
.call(value) ⇒ Integer
Return the string length
21 22 23 |
# File 'lib/axiom/function/string/length.rb', line 21 def self.call(value) value.length end |
Instance Method Details
#type ⇒ Class<Attribute::Integer>
Return the type returned from #call
30 31 32 |
# File 'lib/axiom/function/string/length.rb', line 30 def type Attribute::Integer end |