Class: CommentedFile
- Defined in:
- lib/piggy-core/file_info.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#date_time ⇒ Object
Returns the value of attribute date_time.
-
#height ⇒ Object
Returns the value of attribute height.
-
#rotation ⇒ Object
Returns the value of attribute rotation.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from FileInfo
Attributes inherited from FileName
Instance Method Summary collapse
-
#initialize(the_name, the_path = '', the_comment = '') ⇒ CommentedFile
constructor
A new instance of CommentedFile.
- #rotate? ⇒ Boolean
- #time ⇒ Object
Methods inherited from FileInfo
#ctime_string, #directory!, #directory?, #mtime_string
Methods inherited from FileName
#extension, #name_with_path, #name_without_extension, #path_sections, #set_path
Constructor Details
#initialize(the_name, the_path = '', the_comment = '') ⇒ CommentedFile
Returns a new instance of CommentedFile.
131 132 133 134 135 136 137 138 |
# File 'lib/piggy-core/file_info.rb', line 131 def initialize(the_name, the_path = '', the_comment = '') super(the_name, the_path) @comment = the_comment @date_time = nil @rotation = 0 @width = 0 @height = 0 end |
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
129 130 131 |
# File 'lib/piggy-core/file_info.rb', line 129 def comment @comment end |
#date_time ⇒ Object
Returns the value of attribute date_time.
129 130 131 |
# File 'lib/piggy-core/file_info.rb', line 129 def date_time @date_time end |
#height ⇒ Object
Returns the value of attribute height.
129 130 131 |
# File 'lib/piggy-core/file_info.rb', line 129 def height @height end |
#rotation ⇒ Object
Returns the value of attribute rotation.
129 130 131 |
# File 'lib/piggy-core/file_info.rb', line 129 def rotation @rotation end |
#width ⇒ Object
Returns the value of attribute width.
129 130 131 |
# File 'lib/piggy-core/file_info.rb', line 129 def width @width end |
Instance Method Details
#rotate? ⇒ Boolean
144 145 146 |
# File 'lib/piggy-core/file_info.rb', line 144 def rotate? @rotation && @rotation != 0 end |
#time ⇒ Object
140 141 142 |
# File 'lib/piggy-core/file_info.rb', line 140 def time @date_time.nil? ? @ctime : @date_time end |