Class: NA::Project

Inherits:
Hash
  • Object
show all
Defined in:
lib/na/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Hash

#deep_freeze, #deep_freeze!, #deep_merge, #deep_thaw, #deep_thaw!, #symbolize_keys

Constructor Details

#initialize(project, indent = 0, line = 0, last_line = 0) ⇒ Project

Returns a new instance of Project.



7
8
9
10
11
12
13
# File 'lib/na/project.rb', line 7

def initialize(project, indent = 0, line = 0, last_line = 0)
  super()
  @project = project
  @indent = indent
  @line = line
  @last_line = last_line
end

Instance Attribute Details

#indentObject

Returns the value of attribute indent.



5
6
7
# File 'lib/na/project.rb', line 5

def indent
  @indent
end

#last_lineObject

Returns the value of attribute last_line.



5
6
7
# File 'lib/na/project.rb', line 5

def last_line
  @last_line
end

#lineObject

Returns the value of attribute line.



5
6
7
# File 'lib/na/project.rb', line 5

def line
  @line
end

#projectObject

Returns the value of attribute project.



5
6
7
# File 'lib/na/project.rb', line 5

def project
  @project
end

Instance Method Details

#inspectObject



19
20
21
22
23
24
25
26
# File 'lib/na/project.rb', line 19

def inspect
  [
    "@project: #{@project}",
    "@indent: #{@indent}",
    "@line: #{@line}",
    "@last_line: #{@last_line}"
  ].join(" ")
end

#to_sObject



15
16
17
# File 'lib/na/project.rb', line 15

def to_s
  { project: @project, indent: @indent, line: @line, last_line: @last_line }.to_s
end