module Skeleton::Attributes
Public Instance Methods
attr_not_empty(*methods)
click to toggle source
# File lib/skeleton/attributes.rb, line 11 def attr_not_empty(*methods) Array(methods).each do |method| define_method("#{method}?") do !self.public_send(method.to_s).empty? end end end
attr_presence(*methods)
click to toggle source
# File lib/skeleton/attributes.rb, line 3 def attr_presence(*methods) Array(methods).each do |method| define_method("#{method}?") do !!self.public_send(method.to_s) end end end