Class: PutioFs::PutFile
- Inherits:
-
Object
- Object
- PutioFs::PutFile
- Includes:
- FromHash
- Defined in:
- lib/putio_fs/put_dir.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent_id ⇒ Object
Returns the value of attribute parent_id.
-
#put_dir ⇒ Object
Returns the value of attribute put_dir.
Instance Method Summary collapse
- #directory? ⇒ Boolean
- #file? ⇒ Boolean
-
#initialize(ops) ⇒ PutFile
constructor
A new instance of PutFile.
Constructor Details
#initialize(ops) ⇒ PutFile
Returns a new instance of PutFile.
27 28 29 30 31 |
# File 'lib/putio_fs/put_dir.rb', line 27 def initialize(ops) [:id, :name, :parent_id, :content_type, :put_dir].each do |m| send("#{m}=",ops[m.to_s]) end end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
26 27 28 |
# File 'lib/putio_fs/put_dir.rb', line 26 def content_type @content_type end |
#id ⇒ Object
Returns the value of attribute id.
26 27 28 |
# File 'lib/putio_fs/put_dir.rb', line 26 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
26 27 28 |
# File 'lib/putio_fs/put_dir.rb', line 26 def name @name end |
#parent_id ⇒ Object
Returns the value of attribute parent_id.
26 27 28 |
# File 'lib/putio_fs/put_dir.rb', line 26 def parent_id @parent_id end |
#put_dir ⇒ Object
Returns the value of attribute put_dir.
26 27 28 |
# File 'lib/putio_fs/put_dir.rb', line 26 def put_dir @put_dir end |
Instance Method Details
#directory? ⇒ Boolean
32 33 34 |
# File 'lib/putio_fs/put_dir.rb', line 32 def directory? content_type =~ /directory/ end |
#file? ⇒ Boolean
35 36 37 |
# File 'lib/putio_fs/put_dir.rb', line 35 def file? !directory? end |