Class: StateChange

Inherits:
Object
  • Object
show all
Defined in:
lib/models/state_change.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, repository) ⇒ StateChange

Returns a new instance of StateChange.



4
5
6
# File 'lib/models/state_change.rb', line 4

def initialize(node, repository)
  @query = NodeQuery.new(node, repository)
end

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



2
3
4
# File 'lib/models/state_change.rb', line 2

def query
  @query
end

Instance Method Details

#applyObject



8
9
10
11
12
# File 'lib/models/state_change.rb', line 8

def apply
  new_repo = query.repository.clone
  new_repo.load_and_process_n3(state_rules)
  new_repo
end