Class: PartyResource::Connector::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/party_resource/connector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#defaultObject

Returns the value of attribute default.



41
42
43
# File 'lib/party_resource/connector.rb', line 41

def default
  @default
end

Instance Method Details

#connectorsObject



43
44
45
# File 'lib/party_resource/connector.rb', line 43

def connectors
  @connectors ||= {}
end

#new_connector(name, options) ⇒ Object



47
48
49
50
# File 'lib/party_resource/connector.rb', line 47

def new_connector(name, options)
  connectors[name] = Base.new(name, options)
  self.default = name if default.nil? || options[:default]
end