Class: Nit::Status::State

Inherits:
Object
  • Object
show all
Defined in:
lib/nit/status.rb

Overview

Encapsulates the process of computing the file index from ‘git status`.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(screen_state, config) ⇒ State

TODO: test me.



6
7
8
9
10
# File 'lib/nit/status.rb', line 6

def initialize(screen_state, config)
  @screen = Lines.new(screen_state)

  @files, @ignored = files_for(screen, config)
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



11
12
13
# File 'lib/nit/status.rb', line 11

def files
  @files
end

#ignoredObject (readonly)

Returns the value of attribute ignored.



11
12
13
# File 'lib/nit/status.rb', line 11

def ignored
  @ignored
end

#screenObject (readonly)

Returns the value of attribute screen.



11
12
13
# File 'lib/nit/status.rb', line 11

def screen
  @screen
end