Class: TXTextControl::ReportingCloud::Template
- Inherits:
-
Object
- Object
- TXTextControl::ReportingCloud::Template
- Defined in:
- lib/txtextcontrol/reportingcloud/template.rb
Overview
Holds information about a template in the template storage.
Instance Attribute Summary collapse
-
#modified ⇒ DateTime
readonly
The date and time the template file was last modified.
-
#size ⇒ Integer
readonly
The size of the template file in bytes.
-
#template_name ⇒ String
readonly
The template file name.
Instance Method Summary collapse
-
#initialize(template_name, modified, size) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(template_name, modified, size) ⇒ Template
Returns a new instance of Template
30 31 32 33 34 35 36 37 38 |
# File 'lib/txtextcontrol/reportingcloud/template.rb', line 30 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 |
Instance Attribute Details
#modified ⇒ DateTime (readonly)
The date and time the template file was last modified.
25 26 27 |
# File 'lib/txtextcontrol/reportingcloud/template.rb', line 25 def modified @modified end |
#size ⇒ Integer (readonly)
The size of the template file in bytes.
25 26 27 |
# File 'lib/txtextcontrol/reportingcloud/template.rb', line 25 def size @size end |
#template_name ⇒ String (readonly)
The template file name.
25 26 27 |
# File 'lib/txtextcontrol/reportingcloud/template.rb', line 25 def template_name @template_name end |