Class: Teleport::Config::Apt

Inherits:
Object
  • Object
show all
Defined in:
lib/teleport/config.rb

Overview

The model for an apt line in the Telfile.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line, options) ⇒ Apt

Returns a new instance of Apt.



99
100
101
102
103
104
105
106
107
# File 'lib/teleport/config.rb', line 99

def initialize(line, options)
  raise "apt line must be a string" if !line.is_a?(String)
  raise "apt options must be a hash" if !options.is_a?(Hash)
  @line, @options = line, options

  if k = @options[:key]
    raise "apt :key must be an String" if !k.is_a?(String)
  end
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



97
98
99
# File 'lib/teleport/config.rb', line 97

def line
  @line
end

#optionsObject (readonly)

Returns the value of attribute options.



97
98
99
# File 'lib/teleport/config.rb', line 97

def options
  @options
end