class String

Public Instance Methods

to_yaml_boolean() click to toggle source
# File lib/ssh_bro.rb, line 16
def to_yaml_boolean
  if self.yaml_truthy?
    return true
  elsif self.yaml_falsey?
    return false
  else
    self
  end
end
yaml_falsey?() click to toggle source
# File lib/ssh_bro.rb, line 12
def yaml_falsey?
  ['n', 'no', 'false'].include?(self.downcase)
end
yaml_truthy?() click to toggle source
# File lib/ssh_bro.rb, line 8
def yaml_truthy?
  ['y', 'yes', 'true'].include?(self.downcase)
end