Method: VagrantCloud::Data::Mutable#dirty?

Defined in:
lib/vagrant_cloud/data.rb

#dirty?(key = nil, **opts) ⇒ Boolean

Check if instance is dirty or specific attribute if key is provided

Parameters:

  • key (Symbol) (defaults to: nil)

    Key to check

Returns:

  • (Boolean)

    instance is dirty



239
240
241
242
243
244
245
# File 'lib/vagrant_cloud/data.rb', line 239

def dirty?(key=nil, **opts)
  if key.nil?
    !@dirty.empty?
  else
    @dirty.key?(key.to_sym)
  end
end