class Richcss::TestSpecification

Attributes

dependencies[RW]
name[RW]
version[RW]

Public Class Methods

new(hash) click to toggle source
# File lib/richcss/richcss_test_specification.rb, line 4
def initialize(hash)
  self.name = hash['name']
  self.version = VersionKit::Version.new(hash['version'])
  self.dependencies = hash['dependencies'].map do |(name, requirement)|
    VersionKit::Dependency.new(name, requirement.split(',').map(&:chomp))
  end
end

Public Instance Methods

==(other) click to toggle source
# File lib/richcss/richcss_test_specification.rb, line 12
def ==(other)
  name == other.name &&
    version == other.version &&
    dependencies == other.dependencies
end
to_s() click to toggle source
# File lib/richcss/richcss_test_specification.rb, line 18
def to_s
  "#{name} (#{version})"
end