Class: Interscript::Node::Dependency
- Inherits:
-
Interscript::Node
- Object
- Interscript::Node
- Interscript::Node::Dependency
- Defined in:
- lib/interscript/node/dependency.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
Returns the value of attribute document.
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#import ⇒ Object
Returns the value of attribute import.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize ⇒ Dependency
constructor
A new instance of Dependency.
- #reverse ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Dependency
Returns a new instance of Dependency.
4 5 |
# File 'lib/interscript/node/dependency.rb', line 4 def initialize end |
Instance Attribute Details
#document ⇒ Object
Returns the value of attribute document.
2 3 4 |
# File 'lib/interscript/node/dependency.rb', line 2 def document @document end |
#full_name ⇒ Object
Returns the value of attribute full_name.
2 3 4 |
# File 'lib/interscript/node/dependency.rb', line 2 def full_name @full_name end |
#import ⇒ Object
Returns the value of attribute import.
2 3 4 |
# File 'lib/interscript/node/dependency.rb', line 2 def import @import end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/interscript/node/dependency.rb', line 2 def name @name end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/interscript/node/dependency.rb', line 16 def ==(other) super && self.full_name == other.full_name && self.import == other.import && self.name == other.name end |
#reverse ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/interscript/node/dependency.rb', line 7 def reverse rdep = self.class.new rdep.name = name rdep.full_name = Interscript::Node::Document.reverse_name(full_name) rdep.import = import rdep.document = document&.reverse rdep end |
#to_hash ⇒ Object
23 24 25 26 27 28 |
# File 'lib/interscript/node/dependency.rb', line 23 def to_hash { :class => self.class.to_s, :name => @name, :full_name => @full_name, :import => @import } end |