# class Chef::Resource::Mount

### Public Class Methods

new(name, run_context=nil) click to toggle source
Calls superclass method Chef::Resource.new

    # File lib/chef/resource/mount.rb, line 30
    def initialize(name, run_context=nil)
      super
      @resource_name = :mount
      @mount_point = name
      @device = nil
      @device_type = :device
      @fstype = "auto"
      @options = ["defaults"]
      @dump = 0
      @pass = 2
      @mounted = false
      @enabled = false
      @action = :mount
      @supports = { :remount => false }
      @allowed_actions.push(:mount, :umount, :remount, :enable, :disable)
      @username = nil
      @password = nil
      @domain = nil
    end

### Public Instance Methods

device(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 58
    def device(arg=nil)
      set_or_return(
        :device,
        arg,
        :kind_of => [ String ]
      )
    end

device_type(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 66
    def device_type(arg=nil)
      real_arg = arg.kind_of?(String) ? arg.to_sym : arg
      set_or_return(
        :device_type,
        real_arg,
        :equal_to => [ :device, :label, :uuid ]
      )
    end

domain(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 154
    def domain(arg=nil)
      set_or_return(
        :domain,
        arg,
        :kind_of => [ String ]
      )
    end

dump(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 96
    def dump(arg=nil)
      set_or_return(
        :dump,
        arg,
        :kind_of => [ Integer, FalseClass ]
      )
    end

enabled(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 120
    def enabled(arg=nil)
      set_or_return(
        :enabled,
        arg,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end

fstype(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 75
    def fstype(arg=nil)
      set_or_return(
        :fstype,
        arg,
        :kind_of => [ String ]
      )
    end

mount_point(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 50
    def mount_point(arg=nil)
      set_or_return(
        :mount_point,
        arg,
        :kind_of => [ String ]
      )
    end

mounted(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 112
    def mounted(arg=nil)
      set_or_return(
        :mounted,
        arg,
        :kind_of => [ TrueClass, FalseClass ]
      )
    end

options(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 83
    def options(arg=nil)
      if arg.is_a?(String)
        converted_arg = arg.gsub(/,/, ' ').split(/ /)
      else
        converted_arg = arg
      end
      set_or_return(
        :options,
        converted_arg,
        :kind_of => [ Array ]
      )
    end

pass(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 104
    def pass(arg=nil)
      set_or_return(
        :pass,
        arg,
        :kind_of => [ Integer, FalseClass ]
      )
    end

password(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 146
    def password(arg=nil)
      set_or_return(
        :password,
        arg,
        :kind_of => [ String ]
      )
    end

supports(args={}) click to toggle source

    # File lib/chef/resource/mount.rb, line 128
    def supports(args={})
      if args.is_a? Array
        args.each { |arg| @supports[arg] = true }
      elsif args.any?
        @supports = args
      else
        @supports
      end
    end

username(arg=nil) click to toggle source

    # File lib/chef/resource/mount.rb, line 138
    def username(arg=nil)
      set_or_return(
        :username,
        arg,
        :kind_of => [ String ]
      )
    end