Class: Docks::Languages::YAML

Inherits:
Base
  • Object
show all
Defined in:
lib/docks/languages/yaml_language.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#parser, #renderer, symbol_sources

Constructor Details

#initializeYAML

Returns a new instance of YAML.



9
10
11
# File 'lib/docks/languages/yaml_language.rb', line 9

def initialize
  require "yaml"
end

Class Method Details

.extensionsObject



7
# File 'lib/docks/languages/yaml_language.rb', line 7

def self.extensions; %w(yml yaml) end

.typeObject



6
# File 'lib/docks/languages/yaml_language.rb', line 6

def self.type; Docks::Types::Languages::STUB end

Instance Method Details

#load_stub(file) ⇒ Object



13
14
15
# File 'lib/docks/languages/yaml_language.rb', line 13

def load_stub(file)
  ::YAML::load_file(file)
end