Class: FAP::Relation

Inherits:
Object
  • Object
show all
Defined in:
lib/fap/relation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fromObject

Returns the value of attribute from.



4
5
6
# File 'lib/fap/relation.rb', line 4

def from
  @from
end

#klassObject (readonly)

Returns the value of attribute klass.



3
4
5
# File 'lib/fap/relation.rb', line 3

def klass
  @klass
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/fap/relation.rb', line 3

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/fap/relation.rb', line 3

def type
  @type
end

#xpathObject (readonly)

Returns the value of attribute xpath.



3
4
5
# File 'lib/fap/relation.rb', line 3

def xpath
  @xpath
end