class Brightbox::ConfigMap
Public Class Methods
Source
# File lib/brightbox-cli/config_map.rb, line 9 def self.create(options) new(conn.config_maps.create(options)) end
Source
# File lib/brightbox-cli/config_map.rb, line 17 def self.default_field_order %i[id name] end
Source
# File lib/brightbox-cli/config_map.rb, line 21 def self.detailed_fields %i[ id name ] end
Source
# File lib/brightbox-cli/config_map.rb, line 13 def self.get(id) conn.config_maps.get(id) end
Source
# File lib/brightbox-cli/config_map.rb, line 3 def self.require_account?; true; end
Public Instance Methods
Source
# File lib/brightbox-cli/config_map.rb, line 28 def format_data(format) case format.to_sym when :text attributes[:data].map do |key, value| "#{key.to_s.rjust(16)}: #{value}" end.join("\n") else JSON.dump(data) end end
Source
# File lib/brightbox-cli/config_map.rb, line 39 def to_row { id: attributes[:id], name: attributes[:name], data: attributes[:data] } end
Source
# File lib/brightbox-cli/config_map.rb, line 47 def update(options) self.class.conn.update_config_map(id, options) reload self end