Class: Diakonos::CTag

Inherits:
Object show all
Defined in:
lib/diakonos/ctag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, command, kind, rest) ⇒ CTag

Returns a new instance of CTag.



5
6
7
8
9
10
# File 'lib/diakonos/ctag.rb', line 5

def initialize( file, command, kind, rest )
  @file = file
  @command = command
  @kind = kind
  @rest = rest
end

Instance Attribute Details

#commandObject (readonly)

Returns the value of attribute command.



3
4
5
# File 'lib/diakonos/ctag.rb', line 3

def command
  @command
end

#fileObject (readonly)

Returns the value of attribute file.



3
4
5
# File 'lib/diakonos/ctag.rb', line 3

def file
  @file
end

#kindObject (readonly)

Returns the value of attribute kind.



3
4
5
# File 'lib/diakonos/ctag.rb', line 3

def kind
  @kind
end

#restObject (readonly)

Returns the value of attribute rest.



3
4
5
# File 'lib/diakonos/ctag.rb', line 3

def rest
  @rest
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/diakonos/ctag.rb', line 16

def ==( other )
  other &&
  @file == other.file &&
  @command == other.command &&
  @kind == other.kind &&
  @rest == other.rest
end

#to_sObject



12
13
14
# File 'lib/diakonos/ctag.rb', line 12

def to_s
  "#{@file}:#{@command} (#{@kind}) #{@rest}"
end