123456789_123456789_123456789_123456789_123456789_

Class: YARD::Parser::C::Statement

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: lib/yard/parser/c/statement.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(source, file = nil, line = nil) ⇒ Statement

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 16

def initialize(source, file = nil, line = nil)
  @source = source
  @file = file
  @line = line
end

Instance Attribute Details

#comments_hash_flag (rw)

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 14

attr_accessor :comments_hash_flag

#file (rw)

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 8

attr_accessor :file

#group (rw)

Deprecated.

Groups are now defined by directives

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 12

attr_accessor :group

#line (rw)

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 7

attr_accessor :line

#source (rw)

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 6

attr_accessor :source

Instance Method Details

#comments_range

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 26

def comments_range
  comments.line_range
end

#first_line Also known as: #signature

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 30

def first_line
  source.split(/\n/).first
end

#line_range

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 22

def line_range
  line...(line + source.count("\n"))
end

#show

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 36

def show
  "\t#{line}: #{first_line}"
end

#signature

Alias for #first_line.

[ GitHub ]

  
# File 'lib/yard/parser/c/statement.rb', line 34

alias signature first_line