Class: HornOfPlenty::Models::Board

Inherits:
Object
  • Object
show all
Includes:
Parsable
Defined in:
lib/horn_of_plenty/models/board.rb

Instance Attribute Summary

Attributes included from Parsable

#parser

Instance Method Summary collapse

Methods included from Parsable

included, #initialize

Instance Method Details

#to_hObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/horn_of_plenty/models/board.rb', line 16

def to_h
  {
    id:          id,
    author_id:   author_id,
    title:       title,
    description: description,
    created_at:  created_at,
    updated_at:  updated_at,
  }
end

#to_shaObject



27
28
29
# File 'lib/horn_of_plenty/models/board.rb', line 27

def to_sha
  @sha ||= Digest::SHA2.hexdigest(to_h.to_s)
end