Method: Satis::Editor::Component#lang

Defined in:
app/components/satis/editor/component.rb

#langObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/components/satis/editor/component.rb', line 17

def lang
  # Mode is there for older code, it's deprecated
  if @options[:lang]
    @options[:lang]
  elsif @options[:mode]
    case @options[:mode]
    when 'application/yaml'
      'yaml'
    when 'application/json'
      'json'
    when 'text/x-ruby'
      ''

    end
  end
end