Class: EncoderTools::Options::Title

Inherits:
Object
  • Object
show all
Defined in:
lib/encoder-tools/options/title.rb

Direct Known Subclasses

Longest

Defined Under Namespace

Classes: Longest

Constant Summary collapse

LONGEST =
Longest.instance

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(number) ⇒ Title

Returns a new instance of Title.



8
9
10
# File 'lib/encoder-tools/options/title.rb', line 8

def initialize(number)
  @number = number
end

Instance Attribute Details

#numberObject

Returns the value of attribute number.



6
7
8
# File 'lib/encoder-tools/options/title.rb', line 6

def number
  @number
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
# File 'lib/encoder-tools/options/title.rb', line 12

def ==(other)
  other.is_a?(self.class) && other.number == self.number
end

#to_argsObject



16
17
18
# File 'lib/encoder-tools/options/title.rb', line 16

def to_args
  ['--title', number.to_s]
end