Module: DailyAffirmation

Defined in:
lib/daily_affirmation.rb,
lib/daily_affirmation/version.rb,
lib/daily_affirmation/validator.rb,
lib/daily_affirmation/affirmations.rb,
lib/daily_affirmation/validators/date_validator.rb,
lib/daily_affirmation/validators/custom_validator.rb,
lib/daily_affirmation/validators/format_validator.rb,
lib/daily_affirmation/validators/length_validator.rb,
lib/daily_affirmation/validators/absence_validator.rb,
lib/daily_affirmation/validators/equality_validator.rb,
lib/daily_affirmation/validators/presence_validator.rb,
lib/daily_affirmation/validators/exclusion_validator.rb,
lib/daily_affirmation/validators/inclusion_validator.rb,
lib/daily_affirmation/validators/acceptance_validator.rb,
lib/daily_affirmation/validators/confirmation_validator.rb,
lib/daily_affirmation/validators/numericality_validator.rb

Defined Under Namespace

Modules: Affirmations, Validators Classes: Validator

Constant Summary collapse

OptionError =
Class.new(StandardError)
VERSION =
"1.1.1"

Class Method Summary collapse

Class Method Details

.affirmationsObject

Include DailyAffirmation.affirmations to make your object a validator.



21
22
23
24
25
26
27
# File 'lib/daily_affirmation.rb', line 21

def self.affirmations
  Module.new do
    def self.included(descendant)
      descendant.send(:include, ::DailyAffirmation::Affirmations)
    end
  end
end