Class: Herodotus::Collector::Change

Inherits:
Struct
  • Object
show all
Defined in:
lib/herodotus/collector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#author ⇒ Object

Returns the value of attribute author

Returns:

  • (Object) —

    the current value of author



13
14
15
# File 'lib/herodotus/collector.rb', line 13

def author
  @author
end

#message ⇒ Object

Returns the value of attribute message

Returns:

  • (Object) —

    the current value of message



13
14
15
# File 'lib/herodotus/collector.rb', line 13

def message
  @message
end

#time ⇒ Object

Returns the value of attribute time

Returns:

  • (Object) —

    the current value of time



13
14
15
# File 'lib/herodotus/collector.rb', line 13

def time
  @time
end

Instance Method Details

#log_entry ⇒ Object



18
19
20
21
22
# File 'lib/herodotus/collector.rb', line 18

def log_entry
  "#{time.to_date}  #{pretty_author}" +
  "\n#{message}" +
  "\n\n"
end

#pretty_author ⇒ Object



14
15
16
# File 'lib/herodotus/collector.rb', line 14

def pretty_author
  "#{author.name} <#{author.email}>"
end