Class: SVNx::CatCommandArgs

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

Instance Attribute Summary collapse

Attributes inherited from CommandArgs

#path

Instance Method Summary collapse

Constructor Details

#initialize(args = Hash.new) ⇒ CatCommandArgs

Returns a new instance of CatCommandArgs.



32
33
34
35
36
# File 'lib/svnx/cat/command.rb', line 32

def initialize args = Hash.new
  @use_cache = args[:use_cache].nil? || args[:use_cache]
  @revision = args[:revision]
  super
end

Instance Attribute Details

#revisionObject (readonly)

Returns the value of attribute revision.



29
30
31
# File 'lib/svnx/cat/command.rb', line 29

def revision
  @revision
end

#use_cacheObject (readonly)

Returns the value of attribute use_cache.



30
31
32
# File 'lib/svnx/cat/command.rb', line 30

def use_cache
  @use_cache
end

Instance Method Details

#to_aObject



38
39
40
41
42
43
44
45
46
47
# File 'lib/svnx/cat/command.rb', line 38

def to_a
  ary = Array.new
  if @revision
    ary << "-r#{@revision}"
  end
  
  if @path
    ary << @path
  end
end