Module: Hiccup::Convenience

Included in:
Humanizable, Validatable
Defined in:
lib/hiccup/convenience.rb

Instance Method Summary collapse

Instance Method Details

#annually?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/hiccup/convenience.rb', line 17

def annually?
  kind == :annually
end

#ends?Boolean

Returns:

  • (Boolean)


22
23
24
25
# File 'lib/hiccup/convenience.rb', line 22

def ends?
  return %w{true 1 t}.member?(ends) if ends.is_a?(String)
  !!ends
end

#monthly?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/hiccup/convenience.rb', line 13

def monthly?
  kind == :monthly
end

#never?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/hiccup/convenience.rb', line 5

def never?
  kind == :never
end

#weekly?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/hiccup/convenience.rb', line 9

def weekly?
  kind == :weekly
end