Class: Headsail::Configure

Inherits:
Object
  • Object
show all
Defined in:
lib/headsail/configure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#apisObject (readonly)

Returns the value of attribute apis.



7
8
9
# File 'lib/headsail/configure.rb', line 7

def apis
  @apis
end

#start_clientObject

Returns the value of attribute start_client.



6
7
8
# File 'lib/headsail/configure.rb', line 6

def start_client
  @start_client
end

Instance Method Details

#load_apis(path) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/headsail/configure.rb', line 9

def load_apis(path)
  @apis = YAML.load(ERB.new(File.read(path)).result)
  fail if @apis == false
  Headsail.info('Loaded API YAML file.')
rescue
  Headsail.err('Loading API YAML file.', :exit)
end