Sha256: f0fdb9681cff54824aa35387c27229012f0e1507684bb2d5c4f6b1aa80314622

Contents?: true

Size: 1.34 KB

Versions: 1

Compression:

Stored size: 1.34 KB

Contents

# ReportingCloud Ruby SDK
#
# Official Ruby SDK for the ReportingCloud Web API. Authored, maintained and fully supported 
# by Text Control GmbH. (http://www.textcontrol.com).
#
# Go to http://www.reporting.cloud to learn more about ReportingCloud
# Go to https://github.com/TextControl/txtextcontrol-reportingcloud-ruby for the 
# canonical source repository.
#
# License: https://raw.githubusercontent.com/TextControl/txtextcontrol-reportingcloud-ruby/master/LICENSE.md
#
# Copyright: © 2019 Text Control GmbH

require 'date'

module TXTextControl
  module ReportingCloud
  
    # Holds information about a template in the template storage.
    # @attr_reader template_name [String] The template file name.
    # @attr_reader modified [DateTime] The date and time the template file was
    #   last modified.
    # @attr_reader size [Integer] The size of the template file in bytes.
    # @author Thorsten Kummerow (@thomerow)
    class Template
      attr_reader :template_name
      attr_reader :modified
      attr_reader :size
      
      def initialize(template_name, modified, size)
        @template_name = template_name
        if modified.is_a?(DateTime)
          @modified = modified
        else
          @modified = DateTime.iso8601(modified) 
        end
        @size = size
      end      
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
txtextcontrol-reportingcloud-1.2.1 lib/txtextcontrol/reportingcloud/template.rb