Sha256: edd4cf017e453ed104dcbfc55bb114e548bd296cea9080135b7bf2350e4f19fc
Contents?: true
Size: 614 Bytes
Versions: 1
Compression:
Stored size: 614 Bytes
Contents
module CephStorage # Factory Class to create a Cluster reference object class ClusterFactory < ::CephStorage::Cluster # Defaults CONFIG_DIR = '/etc/ceph'.freeze CLUSTER = 'ceph'.freeze USER = 'client.admin'.freeze FLAGS = 0 class << self # Create a factory method for creating Cluster Objects def build(config_dir: CONFIG_DIR, cluster: CLUSTER, user: USER, flags: FLAGS) c = Cluster.new(cluster: cluster, config_dir: config_dir, user: user, flags: flags) yield(c) if block_given? c end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ceph_storage-0.1.1 | lib/ceph_storage/cluster_factory.rb |