Sha256: 5e47062f40978d9066519493ebb4c44700ec25688f87749efd6fe56d201f6339

Contents?: true

Size: 313 Bytes

Versions: 4

Compression:

Stored size: 313 Bytes

Contents

class VirtualDateTimeElement < VirtualDateElement
  def set(datetime)
    super datetime
    hour_element.set(datetime.hour.to_s.rjust(2, '0'))
    minute_element.set(datetime.min.to_s.rjust(2, '0'))
  end

  def hour_element
    token_element('4i')
  end

  def minute_element
    token_element('5i')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tedium-0.0.5 lib/tedium/virtual_datetime_element.rb
tedium-0.0.4 lib/tedium/virtual_datetime_element.rb
tedium-0.0.3 lib/tedium/virtual_datetime_element.rb
tedium-0.0.2 lib/tedium/virtual_datetime_element.rb