Class: Yoda::Store::Objects::ProjectStatus

Inherits:
Object
  • Object
show all
Includes:
Serializable
Defined in:
lib/yoda/store/objects/project_status.rb

Defined Under Namespace

Classes: BundleStatus, GemStatus, StdStatus

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Serializable

#derive, included, #to_json

Constructor Details

#initialize(bundle:, version:) ⇒ ProjectStatus

Returns a new instance of ProjectStatus.

Parameters:

  • bundle (BundleStatus)
  • version (Integer)

    the version number of registry



21
22
23
24
# File 'lib/yoda/store/objects/project_status.rb', line 21

def initialize(bundle:, version:)
  @bundle = bundle
  @version = version
end

Instance Attribute Details

#bundleBundleStatus (readonly)

Returns:



11
12
13
# File 'lib/yoda/store/objects/project_status.rb', line 11

def bundle
  @bundle
end

#versionInteger (readonly)

Returns:

  • (Integer)


8
9
10
# File 'lib/yoda/store/objects/project_status.rb', line 8

def version
  @version
end

Class Method Details

.initial_build(specs:) ⇒ BundleStatus

Parameters:

  • specs (Array<Bundler::LazySpecification>)

Returns:



15
16
17
# File 'lib/yoda/store/objects/project_status.rb', line 15

def self.initial_build(specs:)
  new(bundle: BundleStatus.initial_build(specs), version: Registry::REGISTRY_VERSION)
end

Instance Method Details

#to_hObject



26
27
28
# File 'lib/yoda/store/objects/project_status.rb', line 26

def to_h
  { bundle: bundle, version: version }
end