Class: ActsAsCalculator::SerializeTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/acts_as_calculator/serialize_template.rb

Class Method Summary collapse

Class Method Details

.call(template:) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/acts_as_calculator/serialize_template.rb', line 5

def self.call(template:)
  { id: template.id, key: template.key, scope: template.scope,
    owner_type: template.owner_type, owner_id: template.owner_id,
    body: template.body, format: template.format,
    version_number: template.version_number, current: template.current,
    created_at: template.created_at&.iso8601, updated_at: template.updated_at&.iso8601 }
end