Class: SVNx::InfoCommandArgs

Inherits:
CommandArgs show all
Defined in:
lib/svnx/info/command.rb

Instance Attribute Summary collapse

Attributes inherited from CommandArgs

#path

Instance Method Summary collapse

Constructor Details

#initialize(args = Hash.new) ⇒ InfoCommandArgs

Returns a new instance of InfoCommandArgs.



17
18
19
20
# File 'lib/svnx/info/command.rb', line 17

def initialize args = Hash.new
  @revision = args[:revision]
  super
end

Instance Attribute Details

#revisionObject (readonly)

Returns the value of attribute revision.



15
16
17
# File 'lib/svnx/info/command.rb', line 15

def revision
  @revision
end

Instance Method Details

#to_aObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/svnx/info/command.rb', line 22

def to_a
  ary = Array.new

  if @revision
    [ @revision ].flatten.each do |rev|
      ary << "-r#{rev}"
    end
  end

  if @path
    ary << @path
  end
  ary
end