Module: InterMine::PathQuery::Coded

Included in:
LoopConstraint, MultiValueConstraint, SingleValueConstraint, UnaryConstraint
Defined in:
lib/intermine/query.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code


1057
1058
1059
# File 'lib/intermine/query.rb', line 1057

def code
  @code
end

#opObject

Returns the value of attribute op


1057
1058
1059
# File 'lib/intermine/query.rb', line 1057

def op
  @op
end

Class Method Details

.valid_opsObject


1059
1060
1061
# File 'lib/intermine/query.rb', line 1059

def self.valid_ops
    return []
end

Instance Method Details

#to_elemObject


1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
# File 'lib/intermine/query.rb', line 1063

def to_elem
    attributes = {
        "path" => @path,
        "op" => @op,
        "code" => @code
    }.delete_if {|k,v| !v}
    elem = REXML::Element.new("constraint")
    elem.add_attributes(attributes)
    return elem
end