Class: Canvas::FetchCustomTypes

Inherits:
Object
  • Object
show all
Defined in:
lib/canvas/services/fetch_custom_types.rb

Overview

:documented: This service can be used to fetch the custom types from the /types directory.

Class Method Summary collapse

Class Method Details

.callArray<Hash>

theme within the /types directory.

Returns:

  • (Array<Hash>)

    a list of all the custom types defined in the



12
13
14
15
# File 'lib/canvas/services/fetch_custom_types.rb', line 12

def call
  filenames = Dir.glob("types/*.json")
  filenames.map { |filename| extract_json(filename) }.compact
end