class Cyoi::Cli::Providers::ProviderCli

Attributes

attributes[R]
hl[R]

Public Class Methods

new(attributes, highline) click to toggle source
# File lib/cyoi/cli/providers/provider_cli.rb, line 7
def initialize(attributes, highline)
  @hl = highline
  @attributes = attributes.is_a?(Hash) ? ReadWriteSettings.new(attributes) : attributes
  raise "@attributes must be ReadWriteSettings (or Hash)" unless @attributes.is_a?(ReadWriteSettings)
end

Public Instance Methods

display_confirmation() click to toggle source
# File lib/cyoi/cli/providers/provider_cli.rb, line 25
def display_confirmation
  raise "please implement in subclass"
end
export_attributes() click to toggle source

helper to export the complete nested attributes.

# File lib/cyoi/cli/providers/provider_cli.rb, line 14
def export_attributes
  attributes.to_nested_hash
end
say(message, *args) click to toggle source
# File lib/cyoi/cli/providers/provider_cli.rb, line 29
def say(message, *args)
  puts(message)
end
valid_infrastructure?() click to toggle source

Only a subclass can represent valid infrastruct If using this class directly, then it has not yet decided which provider/infrastructure to use

# File lib/cyoi/cli/providers/provider_cli.rb, line 21
def valid_infrastructure?
  false
end