Class: Kumogata2::Plugin::YAML

Inherits:
Object
  • Object
show all
Defined in:
lib/kumogata2/plugin/yaml/version.rb,
lib/kumogata2/plugin/yaml.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ YAML

Returns a new instance of YAML.



7
8
9
# File 'lib/kumogata2/plugin/yaml.rb', line 7

def initialize(options)
  @options = options
end

Instance Method Details

#dump(hash) ⇒ Object



15
16
17
# File 'lib/kumogata2/plugin/yaml.rb', line 15

def dump(hash)
  YAML.dump(hash).colorize_as(:yaml)
end

#parse(str) ⇒ Object



11
12
13
# File 'lib/kumogata2/plugin/yaml.rb', line 11

def parse(str)
  YAML.load(str)
end