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



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

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



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

def command
  @command
end

#fileObject (readonly)

Returns the value of attribute file



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

def file
  @file
end

#kindObject (readonly)

Returns the value of attribute kind



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

def kind
  @kind
end

#restObject (readonly)

Returns the value of attribute rest



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

def rest
  @rest
end

Instance Method Details

#==(other) ⇒ Object



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

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

#to_sObject



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

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