Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/calfilter/time_extensions.rb

Overview

:nodoc: all

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#utc=(value) ⇒ Object (writeonly)

Sets the attribute utc

Parameters:

  • value

    the value to set the attribute utc to.



2
3
4
# File 'lib/calfilter/time_extensions.rb', line 2

def utc=(value)
  @utc = value
end

Instance Method Details

#to_ical(unused_utc = false) ⇒ Object



8
9
10
# File 'lib/calfilter/time_extensions.rb', line 8

def to_ical(unused_utc = false)
  strftime('%H%M%S') + (utc? ? 'Z' : '')
end

#utc?Boolean

Returns:

  • (Boolean)


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

def utc?
  @utc
end