Class: PgGraphQl::Schema::Link

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(owner, name, many) ⇒ Link

Returns a new instance of Link.



116
117
118
119
120
121
# File 'lib/pggraphql.rb', line 116

def initialize(owner, name, many)
  @owner = owner
  @name = name
  @many = many
  @order_by = nil
end

Instance Attribute Details

#filterObject

Returns the value of attribute filter.



115
116
117
# File 'lib/pggraphql.rb', line 115

def filter
  @filter
end

#fkObject

Returns the value of attribute fk.



115
116
117
# File 'lib/pggraphql.rb', line 115

def fk
  @fk
end

#nameObject

Returns the value of attribute name.



115
116
117
# File 'lib/pggraphql.rb', line 115

def name
  @name
end

#order_byObject

Returns the value of attribute order_by.



115
116
117
# File 'lib/pggraphql.rb', line 115

def order_by
  @order_by
end

Instance Method Details

#many?Boolean

Returns:

  • (Boolean)


128
129
130
# File 'lib/pggraphql.rb', line 128

def many?
  !!@many
end

#typeObject



125
126
127
# File 'lib/pggraphql.rb', line 125

def type
  @owner.schema.types[@_type||@name.to_s.singularize.to_sym]
end

#type=(_type) ⇒ Object



122
123
124
# File 'lib/pggraphql.rb', line 122

def type=(_type)
  @_type = _type
end