module Past::Checker

Constants

VERSION

Public Instance Methods

checker_attribute(name) click to toggle source
# File lib/past/checker.rb, line 26
def checker_attribute(name)
  return 'll_be_' + name.to_s.chop if ll_attribute_presence?(name)
  return 'will_be_' + name.to_s.chop if will_attribute_presence?(name)
  return 'll_be_' + name.to_s.chop + '_at' if ll_at_attribute_presence?(name)
  return 'will_be_' + name.to_s.chop + '_at' if will_at_attribute_presence?(name)
  nil
end
ll_at_attribute_presence?(name) click to toggle source
# File lib/past/checker.rb, line 44
def ll_at_attribute_presence?(name)
  return true if has_attribute?('ll_be_' + name.to_s.chop + '_at')
  false
end
ll_attribute_presence?(name) click to toggle source
# File lib/past/checker.rb, line 34
def ll_attribute_presence?(name)
  return true if has_attribute?('ll_be_' + name.to_s.chop)
  false
end
will_at_attribute_presence?(name) click to toggle source
# File lib/past/checker.rb, line 49
def will_at_attribute_presence?(name)
  return true if has_attribute?('will_be_' + name.to_s.chop + '_at')
  false
end
will_attribute_presence?(name) click to toggle source
# File lib/past/checker.rb, line 39
def will_attribute_presence?(name)
  return true if has_attribute?('will_be_' + name.to_s.chop)
  false
end