Class: StateChange
- Inherits:
-
Object
- Object
- StateChange
- Defined in:
- lib/models/state_change.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(node, repository) ⇒ StateChange
constructor
A new instance of StateChange.
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
#query ⇒ Object (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
#apply ⇒ Object
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 |