Class: Docks::Languages::JSON
- Defined in:
- lib/docks/languages/json_language.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ JSON
constructor
A new instance of JSON.
- #load_stub(file) ⇒ Object
Methods inherited from Base
#parser, #renderer, symbol_sources
Constructor Details
#initialize ⇒ JSON
Returns a new instance of JSON.
9 10 11 |
# File 'lib/docks/languages/json_language.rb', line 9 def initialize require "json" end |
Class Method Details
.extensions ⇒ Object
7 |
# File 'lib/docks/languages/json_language.rb', line 7 def self.extensions; %w(json) end |
Instance Method Details
#load_stub(file) ⇒ Object
13 14 15 |
# File 'lib/docks/languages/json_language.rb', line 13 def load_stub(file) ::JSON::load(File.read(file).force_encoding("UTF-8")) end |