Class: ChipmunkBagValidator

Inherits:
Object
  • Object
show all
Includes:
ChipmunkValidatable
Defined in:
lib/chipmunk_bag_validator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ChipmunkValidatable

included, #valid?

Constructor Details

#initialize(package, errors = [], storage = Services.storage) ⇒ ChipmunkBagValidator


8
9
10
11
12
13
# File 'lib/chipmunk_bag_validator.rb', line 8

def initialize(package, errors = [], storage = Services.storage)
  @package = package
  @src_path = package.src_path
  @bag = storage.new(src_path) if File.exist?(src_path)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors


6
7
8
# File 'lib/chipmunk_bag_validator.rb', line 6

def errors
  @errors
end