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 554 def initialize(value) @value = value end
Public Instance Methods
dateable?()
click to toggle source
# File lib/capybara/selenium/node.rb, line 562 def dateable? !value.is_a?(String) && value.respond_to?(:to_date) end
timeable?()
click to toggle source
# File lib/capybara/selenium/node.rb, line 570 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 566 def to_date_str value.to_date.iso8601 end
to_datetime_str()
click to toggle source
# File lib/capybara/selenium/node.rb, line 578 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 558 def to_s value.to_s end
to_time_str()
click to toggle source
# File lib/capybara/selenium/node.rb, line 574 def to_time_str value.to_time.strftime('%H:%M') end