Class: ConfCtl::Swpins::ChangeSet::SpecSet

Inherits:
Struct
  • Object
show all
Defined in:
lib/confctl/swpins/change_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#original_infoObject

Returns the value of attribute original_info

Returns:

  • (Object)

    the current value of original_info



7
8
9
# File 'lib/confctl/swpins/change_set.rb', line 7

def original_info
  @original_info
end

#original_versionObject

Returns the value of attribute original_version

Returns:

  • (Object)

    the current value of original_version



7
8
9
# File 'lib/confctl/swpins/change_set.rb', line 7

def original_version
  @original_version
end

#specObject

Returns the value of attribute spec

Returns:

  • (Object)

    the current value of spec



7
8
9
# File 'lib/confctl/swpins/change_set.rb', line 7

def spec
  @spec
end

Instance Method Details

#changed?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/confctl/swpins/change_set.rb', line 20

def changed?
  original_version != new_version
end

#nameObject



8
9
10
# File 'lib/confctl/swpins/change_set.rb', line 8

def name
  spec.name
end

#new_infoObject



16
17
18
# File 'lib/confctl/swpins/change_set.rb', line 16

def new_info
  spec.info
end

#new_versionObject



12
13
14
# File 'lib/confctl/swpins/change_set.rb', line 12

def new_version
  spec.version
end

#string_changelog(type) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/confctl/swpins/change_set.rb', line 24

def string_changelog(type)
  if original_info
    spec.string_changelog_info(type, original_info, color: false)
  else
    "Initial version\n"
  end
end