Class: CommentedFile
- Defined in:
- lib/piggy-core/file_info.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#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
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 |
# 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 @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 |
#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
139 140 141 |
# File 'lib/piggy-core/file_info.rb', line 139 def rotate? @rotation && @rotation != 0 end |