Class: ArelExtensions::Nodes::Length

Inherits:
Function
  • Object
show all
Defined in:
lib/arel_extensions/nodes/length.rb

Constant Summary collapse

RETURN_TYPE =
:integer

Constants inherited from Function

Function::MBSTRING

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Function

#!=, #==, #as, #convert_to_date_node, #convert_to_datetime_node, #convert_to_node, #convert_to_number, #convert_to_string_node, #expr, #left, #return_type, #right, #type_of_attribute

Methods included from Predications

#cast, #convert_to_node, #imatches, #in, #matches, #not_in, #when

Constructor Details

#initialize(node, bytewise = true) ⇒ Length

Returns a new instance of Length.



7
8
9
10
# File 'lib/arel_extensions/nodes/length.rb', line 7

def initialize(node, bytewise = true)
  @bytewise = bytewise
  super([node])
end

Instance Attribute Details

#bytewiseObject

Returns the value of attribute bytewise.



5
6
7
# File 'lib/arel_extensions/nodes/length.rb', line 5

def bytewise
  @bytewise
end