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

#authorObject

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

#messageObject

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

#timeObject

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_entryObject



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_authorObject



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

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