Class: Timestamper

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/timestamper/timestamper.rb,
lib/timestamper/configuration.rb,
lib/timestamper/rack_middleware.rb

Defined Under Namespace

Classes: Configuration, RackMiddleware

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#overrideObject

Returns the value of attribute override.



4
5
6
# File 'lib/timestamper/timestamper.rb', line 4

def override
  @override
end

#updated_atObject

Returns the value of attribute updated_at.



4
5
6
# File 'lib/timestamper/timestamper.rb', line 4

def updated_at
  @updated_at
end

Class Method Details

.config(&block) ⇒ Object



23
24
25
# File 'lib/timestamper/timestamper.rb', line 23

def self.config(&block)
  configuration.instance_eval(&block)
end

.configurationObject



19
20
21
# File 'lib/timestamper/timestamper.rb', line 19

def self.configuration
  @configuration ||= Configuration.new
end

Instance Method Details

#resetObject



6
7
8
9
# File 'lib/timestamper/timestamper.rb', line 6

def reset
  @override = nil
  @updated_at = nil
end