Sha256: 46d365905b1bfae4799d0bd6b16e0c71c74727858bdbd8fb3ed787f73345f629
Contents?: true
Size: 696 Bytes
Versions: 8
Compression:
Stored size: 696 Bytes
Contents
require 'cap-util' module CapUtil # the class should be use as a superclass for fetching server roles yaml. class ServerRolesYaml include CapUtil attr_reader :desc, :source def initialize(cap, opts=nil) opts ||= {} @cap = cap @desc = opts[:desc] ? "#{opts[:desc]} server roles" : "server roles" @source = opts[:source] ? " from #{opts[:source]}" : "" end def get say "Applying #{color @desc, :bold, :cyan}#{@source}." validate valid? ? read : halt end def validate; raise NotImplementedError; end def valid?; raise NotImplementedError; end def read; raise NotImplementedError; end end end
Version data entries
8 entries across 8 versions & 1 rubygems