Class: CompareLinker::Formatter::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/compare_linker/formatter/base.rb

Direct Known Subclasses

Markdown, Text

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#downgradedObject (readonly)

Returns the value of attribute downgraded.



6
7
8
# File 'lib/compare_linker/formatter/base.rb', line 6

def downgraded
  @downgraded
end

#gObject (readonly)

Returns the value of attribute g.



6
7
8
# File 'lib/compare_linker/formatter/base.rb', line 6

def g
  @g
end

Instance Method Details

#format(gem_info) ⇒ Object



8
9
10
11
12
# File 'lib/compare_linker/formatter/base.rb', line 8

def format(gem_info)
  @g = OpenStruct.new(gem_info)
  @downgraded = downgrade?(g.old_ver, g.new_ver, g.old_tag, g.new_tag, g.old_rev, g.new_rev)
  post_format
end