Class: EacFs::FileInfo
Constant Summary collapse
- UNKNOWN_CONTENT_TYPE_STRING =
'application/octet-stream'
- UNKNOWN_CONTENT_TYPE =
::ContentType.parse(UNKNOWN_CONTENT_TYPE_STRING)
Instance Attribute Summary collapse
-
#magic_string ⇒ Object
readonly
Returns the value of attribute magic_string.
Instance Method Summary collapse
-
#initialize(path) ⇒ FileInfo
constructor
A new instance of FileInfo.
Constructor Details
#initialize(path) ⇒ FileInfo
Returns a new instance of FileInfo.
15 16 17 |
# File 'lib/eac_fs/file_info.rb', line 15 def initialize(path) @magic_string = ::FileMagic.new(FileMagic::MAGIC_MIME).file(path.to_pathname.to_path) end |
Instance Attribute Details
#magic_string ⇒ Object (readonly)
Returns the value of attribute magic_string.
13 14 15 |
# File 'lib/eac_fs/file_info.rb', line 13 def magic_string @magic_string end |