Class: Bsdkrun::VolumeInfo
- Inherits:
-
Data
- Object
- Data
- Bsdkrun::VolumeInfo
- Defined in:
- lib/bsdkrun/types.rb
Overview
A volume as reported by bsdkrun volume ls --json.
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#guest ⇒ Object
readonly
Returns the value of attribute guest.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#tracked ⇒ Object
readonly
Returns the value of attribute tracked.
Class Method Summary collapse
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base
66 67 68 |
# File 'lib/bsdkrun/types.rb', line 66 def base @base end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
66 67 68 |
# File 'lib/bsdkrun/types.rb', line 66 def created_at @created_at end |
#guest ⇒ Object (readonly)
Returns the value of attribute guest
66 67 68 |
# File 'lib/bsdkrun/types.rb', line 66 def guest @guest end |
#name ⇒ Object (readonly)
Returns the value of attribute name
66 67 68 |
# File 'lib/bsdkrun/types.rb', line 66 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path
66 67 68 |
# File 'lib/bsdkrun/types.rb', line 66 def path @path end |
#size ⇒ Object (readonly)
Returns the value of attribute size
66 67 68 |
# File 'lib/bsdkrun/types.rb', line 66 def size @size end |
#tracked ⇒ Object (readonly)
Returns the value of attribute tracked
66 67 68 |
# File 'lib/bsdkrun/types.rb', line 66 def tracked @tracked end |
Class Method Details
.from_row(row) ⇒ VolumeInfo
69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/bsdkrun/types.rb', line 69 def self.from_row(row) created = row["created_at"] new( name: row["name"].to_s, guest: row["guest"], base: row["base"], path: row["path"].to_s, size: row["size"].to_s, created_at: created.nil? ? nil : created.to_i, tracked: !!row["tracked"] ) end |