Class: Chef::RubyCompat

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/ruby_compat.rb

Defined Under Namespace

Classes: RubyIO

Class Method Summary collapse

Class Method Details

.to_ruby(data) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/chef/ruby_compat.rb', line 28

def self.to_ruby(data)

  case data
  when Chef::Role
    role_to_ruby(data)
  when Chef::Environment
    environment_to_ruby(data)
  else
    raise ArgumentError, "[#{data.class.name}] is not supported by ruby format"
  end

end