Class: Shortwave::Facade::Build::FacadeBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/shortwave/facade/build/facade_builder.rb

Overview

Helper methods for constructing the Facades

Instance Method Summary collapse

Instance Method Details

#remote_method_definitions(location) ⇒ Object



33
34
35
36
37
38
39
40
41
42
# File 'lib/shortwave/facade/build/facade_builder.rb', line 33

def remote_method_definitions(location)
  return @method_definitions if @method_definitions
  if File.exists?( location )
    @method_definitions = YAML.load(File.read(location))
  else
    response = Build::DocumentationRemote.scrape_remote_method_index
    File.open(location, "w") {|fh| fh.write(response.to_yaml) }
    @method_definitions = response
  end
end