Class: MajortomConnector::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



6
7
8
# File 'lib/majortom_connector/config.rb', line 6

def initialize
  load_server_config
end

Instance Attribute Details

#api_keyObject

Returns the value of attribute api_key.



4
5
6
# File 'lib/majortom_connector/config.rb', line 4

def api_key
  @api_key
end

#contextObject

Returns the value of attribute context.



4
5
6
# File 'lib/majortom_connector/config.rb', line 4

def context
  @context
end

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/majortom_connector/config.rb', line 4

def host
  @host
end

#map_idObject

Returns the value of attribute map_id.



4
5
6
# File 'lib/majortom_connector/config.rb', line 4

def map_id
  @map_id
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/majortom_connector/config.rb', line 4

def port
  @port
end

Instance Method Details

#ready?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/majortom_connector/config.rb', line 10

def ready?
  !(@host.blank? || @port.blank? || @context.blank? || @api_key.blank?)
end