Class: ImageOptim::BinResolver::Bin

Inherits:
Object
  • Object
show all
Defined in:
lib/image_optim/bin_resolver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version) ⇒ Bin

Returns a new instance of Bin.



11
12
13
# File 'lib/image_optim/bin_resolver.rb', line 11

def initialize(name, version)
  @name, @version = name, version
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/image_optim/bin_resolver.rb', line 10

def name
  @name
end

#versionObject (readonly)

Returns the value of attribute version.



10
11
12
# File 'lib/image_optim/bin_resolver.rb', line 10

def version
  @version
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/image_optim/bin_resolver.rb', line 15

def to_s
  "#{@name} #{@version || '-'}"
end