Module: Pragma::Decorator::Timestamp::ClassMethods

Defined in:
lib/pragma/decorator/timestamp.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#timestamp(name, options = {}) ⇒ Object

Defines a timestamp property which will be rendered as UNIX time.

Parameters:

  • name (Symbol)

    the name of the property

  • options (Hash) (defaults to: {})

    the options of the property



26
27
28
29
# File 'lib/pragma/decorator/timestamp.rb', line 26

def timestamp(name, options = {})
  create_timestamp_getter(name, options)
  create_timestamp_property(name, options)
end