Class: RemindMe::Reminder::BaseReminder

Inherits:
Object
  • Object
show all
Extended by:
Utils::HashASTManipulations
Defined in:
lib/remind_me/reminder/base_reminder.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils::HashASTManipulations

apply_to_hash_with, ast_hash_pair, children_of_type, create_hash_value_accessor_method, create_reminder_from_ast, hash_ast_pair_value, hash_ast_pair_value_type, key_present?, singleton_method_defined?, valid_hash_ast_key?, valid_hash_ast_value?, validate_hash_ast

Instance Attribute Details

#reminder_comment_astObject (readonly)

Returns the value of attribute reminder_comment_ast.



11
12
13
# File 'lib/remind_me/reminder/base_reminder.rb', line 11

def reminder_comment_ast
  @reminder_comment_ast
end

#source_locationObject (readonly)

Returns the value of attribute source_location.



11
12
13
# File 'lib/remind_me/reminder/base_reminder.rb', line 11

def source_location
  @source_location
end

Class Method Details

.inherited(base) ⇒ Object



13
14
15
16
# File 'lib/remind_me/reminder/base_reminder.rb', line 13

def self.inherited(base)
  RemindMe::Reminder::Generator.register(base)
  super(base)
end

Instance Method Details

#conditions_met?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/remind_me/reminder/base_reminder.rb', line 18

def conditions_met?
  raise NotImplementedError
end

#inspectObject



26
27
28
# File 'lib/remind_me/reminder/base_reminder.rb', line 26

def inspect
  "#<#{self.class}, source: #{source_location}>"
end

#messageObject



30
31
32
# File 'lib/remind_me/reminder/base_reminder.rb', line 30

def message
  "#{hash_message} at #{source_location}"
end

#validation_errorsObject



22
23
24
# File 'lib/remind_me/reminder/base_reminder.rb', line 22

def validation_errors
  []
end