Sha256: d24d16354e0530307394bb0116cd0f0be54ede9940f7e2b9bc3a02c89ec69cb1

Contents?: true

Size: 853 Bytes

Versions: 1

Compression:

Stored size: 853 Bytes

Contents

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-

require "chef/fork/commands"

class Chef
  class Fork
    module Commands
      class Role < Noop
        def run(args=[])
          case args.first
          when "from"
            role_from(args.slice(1..-1))
          when "show"
            role_show(args.slice(1..-1))
          else
            raise(NameError.new(args.inspect))
          end
        end

        def role_from(args=[])
          case args.shift
          when "file"
            rome_from_file(args.slice(1..-1))
          else
            raise(NameError.new(args.inspect))
          end
        end

        def role_from_file(args=[])
          raise(NotImplementedError.new(args.inspect))
        end

        def role_show(args=[])
          raise(NotImplementedError.new(args.inspect))
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chef-fork-0.1.0 lib/chef/fork/commands/role.rb