Class: Albacore::NugetModel::IdVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/albacore/nuget_model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, version, group, target_framework) ⇒ IdVersion

Returns a new instance of IdVersion.



14
15
16
# File 'lib/albacore/nuget_model.rb', line 14

def initialize id, version, group, target_framework
  @id, @version, @group, @target_framework = id, version, group, target_framework
end

Instance Attribute Details

#groupObject (readonly)

Returns the value of attribute group.



12
13
14
# File 'lib/albacore/nuget_model.rb', line 12

def group
  @group
end

#idObject (readonly)

Returns the value of attribute id.



12
13
14
# File 'lib/albacore/nuget_model.rb', line 12

def id
  @id
end

#target_frameworkObject (readonly)

Returns the value of attribute target_framework.



12
13
14
# File 'lib/albacore/nuget_model.rb', line 12

def target_framework
  @target_framework
end

#versionObject (readonly)

Returns the value of attribute version.



12
13
14
# File 'lib/albacore/nuget_model.rb', line 12

def version
  @version
end

Instance Method Details

#to_sObject



18
19
20
21
22
23
24
# File 'lib/albacore/nuget_model.rb', line 18

def to_s
  if ! target_framework.nil? && target_framework != ''
    "#{id}@#{version} when #{target_framework}"
  else
    "#{id}@#{version} grouped:#{group}"
  end
end