Class: Netscaler::System::File
- Inherits:
-
NetscalerService
- Object
- NetscalerService
- Netscaler::System::File
- Defined in:
- lib/netscaler/system/file.rb
Instance Method Summary collapse
- #add(payload = {}) ⇒ Object
-
#initialize(netscaler) ⇒ File
constructor
A new instance of File.
Methods inherited from NetscalerService
Constructor Details
#initialize(netscaler) ⇒ File
Returns a new instance of File.
6 7 8 |
# File 'lib/netscaler/system/file.rb', line 6 def initialize(netscaler) @netscaler = netscaler end |
Instance Method Details
#add(payload = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/netscaler/system/file.rb', line 10 def add(payload = {}) raise ArgumentError, 'payload cannot be null' if payload.nil? validate_payload(payload, [:filename, :filecontent, :filelocation]) return @netscaler.adapter.post('config/systemfile', { 'systemfile' => payload }) end |