Class: Rubyang::Database::SchemaTree::When

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyang/database/schema_tree.rb

Overview

when start

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(schema_node, schema) ⇒ When

Returns a new instance of When.



16
17
18
19
20
21
22
23
24
25
# File 'lib/rubyang/database/schema_tree.rb', line 16

def initialize schema_node, schema
  @logger = Logger.new(self.class.name)
  @schema_node = schema_node
  @schema = schema
  @arg = schema.arg
  @xpath = Rubyang::Xpath::Parser.parse @arg
  @logger.debug { 'when xpath:' }
  @logger.debug { @xpath.to_yaml }
  @schema_node.evaluate_xpath @xpath
end

Instance Attribute Details

#argObject (readonly)

Returns the value of attribute arg.



15
16
17
# File 'lib/rubyang/database/schema_tree.rb', line 15

def arg
  @arg
end

#xpathObject (readonly)

Returns the value of attribute xpath.



15
16
17
# File 'lib/rubyang/database/schema_tree.rb', line 15

def xpath
  @xpath
end