Class: OsCtl::ExportFS::Export
- Inherits:
-
Object
- Object
- OsCtl::ExportFS::Export
- Defined in:
- lib/osctl/exportfs/export.rb
Instance Attribute Summary collapse
-
#as ⇒ String
readonly
Directory to export in the server namespace.
-
#dir ⇒ String
readonly
Directory to export from the host namespace.
-
#host ⇒ String
readonly
Mask for hosts that can access this export.
-
#options ⇒ String
readonly
NFS options.
Class Method Summary collapse
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(export) ⇒ Export
constructor
A new instance of Export.
Constructor Details
#initialize(export) ⇒ Export
Returns a new instance of Export.
28 29 30 31 32 33 |
# File 'lib/osctl/exportfs/export.rb', line 28 def initialize(export) @dir = export[:dir] @as = export[:as] || export[:dir] @host = export[:host] @options = export[:options] end |
Instance Attribute Details
#as ⇒ String (readonly)
Directory to export in the server namespace
9 10 11 |
# File 'lib/osctl/exportfs/export.rb', line 9 def as @as end |
#dir ⇒ String (readonly)
Directory to export from the host namespace
5 6 7 |
# File 'lib/osctl/exportfs/export.rb', line 5 def dir @dir end |
#host ⇒ String (readonly)
Mask for hosts that can access this export
13 14 15 |
# File 'lib/osctl/exportfs/export.rb', line 13 def host @host end |
#options ⇒ String (readonly)
NFS options
17 18 19 |
# File 'lib/osctl/exportfs/export.rb', line 17 def @options end |
Class Method Details
.load(data) ⇒ Object
19 20 21 |
# File 'lib/osctl/exportfs/export.rb', line 19 def self.load(data) new(data.transform_keys(&:to_sym)) end |
Instance Method Details
#dump ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/osctl/exportfs/export.rb', line 35 def dump { 'dir' => dir, 'as' => as, 'host' => host, 'options' => } end |