class Capybara::Selenium::Node::SettableValue
SettableValue encapsulates time/date field formatting
Attributes
value[R]
Public Class Methods
new(value)
click to toggle source
# File lib/capybara/selenium/node.rb, line 354 def initialize(value) @value = value end
Public Instance Methods
dateable?()
click to toggle source
# File lib/capybara/selenium/node.rb, line 362 def dateable? !value.is_a?(String) && value.respond_to?(:to_date) end
timeable?()
click to toggle source
# File lib/capybara/selenium/node.rb, line 370 def timeable? !value.is_a?(String) && value.respond_to?(:to_time) end
to_date_str()
click to toggle source
# File lib/capybara/selenium/node.rb, line 366 def to_date_str value.to_date.strftime('%Y-%m-%d') end
to_datetime_str()
click to toggle source
# File lib/capybara/selenium/node.rb, line 378 def to_datetime_str value.to_time.strftime('%Y-%m-%dT%H:%M') end
to_s()
click to toggle source
# File lib/capybara/selenium/node.rb, line 358 def to_s value.to_s end
to_time_str()
click to toggle source
# File lib/capybara/selenium/node.rb, line 374 def to_time_str value.to_time.strftime('%H:%M') end