Class: Predicator::Nodes::StringNode

Inherits:
BaseNode
  • Object
show all
Defined in:
lib/predicator/nodes/string_node.rb

Instance Attribute Summary

Attributes inherited from BaseNode

#value

Instance Method Summary collapse

Methods inherited from BaseNode

#blank?, class_for, #compare_to_fixnum, #compare_to_float, #compare_to_nil, #compare_to_string, #comparison_method, #initialize, #present?

Constructor Details

This class inherits a constructor from Predicator::Nodes::BaseNode

Instance Method Details

#compare_to_dateObject



8
9
10
# File 'lib/predicator/nodes/string_node.rb', line 8

def compare_to_date
  Date.parse value
end

#typeObject



4
5
6
# File 'lib/predicator/nodes/string_node.rb', line 4

def type
  :string
end