Class: Bosh::Director::Line

Inherits:
Struct
  • Object
show all
Defined in:
lib/bosh/director/manifest/diff_lines.rb

Constant Summary collapse

INDENT =
2

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#indentObject

Returns the value of attribute indent

Returns:

  • (Object)

    the current value of indent



2
3
4
# File 'lib/bosh/director/manifest/diff_lines.rb', line 2

def indent
  @indent
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



2
3
4
# File 'lib/bosh/director/manifest/diff_lines.rb', line 2

def status
  @status
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



2
3
4
# File 'lib/bosh/director/manifest/diff_lines.rb', line 2

def text
  @text
end

Instance Method Details

#full_indentObject



9
10
11
# File 'lib/bosh/director/manifest/diff_lines.rb', line 9

def full_indent
  indent + text[/^ */].size / INDENT
end

#to_sObject



5
6
7
# File 'lib/bosh/director/manifest/diff_lines.rb', line 5

def to_s
  "#{' ' * INDENT * indent}#{text}"
end