Class: FAP::Relation
- Inherits:
-
Object
- Object
- FAP::Relation
- Defined in:
- lib/fap/relation.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#xpath ⇒ Object
readonly
Returns the value of attribute xpath.
Instance Method Summary collapse
-
#initialize(name, opt = {}) ⇒ Relation
constructor
A new instance of Relation.
Constructor Details
#initialize(name, opt = {}) ⇒ Relation
Returns a new instance of Relation.
6 7 8 9 10 11 12 |
# File 'lib/fap/relation.rb', line 6 def initialize name, opt={} @name = name @type = opt[:type] @xpath = opt[:xpath] || name @klass = opt[:class] || nil @from = opt[:from] || nil end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
4 5 6 |
# File 'lib/fap/relation.rb', line 4 def from @from end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
3 4 5 |
# File 'lib/fap/relation.rb', line 3 def klass @klass end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/fap/relation.rb', line 3 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/fap/relation.rb', line 3 def type @type end |
#xpath ⇒ Object (readonly)
Returns the value of attribute xpath.
3 4 5 |
# File 'lib/fap/relation.rb', line 3 def xpath @xpath end |