Class: Model::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.



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

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

Instance Attribute Details

#queryObject (readonly)

Returns the value of attribute query.



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

def query
  @query
end

Instance Method Details

#applyObject



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

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