Class: ParamsReady::Query::PolymorphPredicateDefinition

Inherits:
AbstractPredicateDefinition show all
Extended by:
Forwardable
Defined in:
lib/params_ready/query/polymorph_predicate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Parameter::AbstractDefinition

#create, #from_hash, #from_input, #normalize_alternative_name, #parameter_class

Methods included from Extensions::Freezer

#freeze_variable, #freeze_variables, #variables_to_freeze

Methods included from Extensions::Finalizer

#obligatory, #obligatory!

Methods included from Extensions::ClassReaderWriter

#class_reader_writer

Methods included from Extensions::LateInit

#late_init

Methods included from Extensions::Collection

#collection

Methods included from Extensions::Freezer::InstanceMethods

#freeze

Constructor Details

#initialize(*args, **opts) ⇒ PolymorphPredicateDefinition

Returns a new instance of PolymorphPredicateDefinition.



63
64
65
66
67
# File 'lib/params_ready/query/polymorph_predicate.rb', line 63

def initialize(*args, **opts)
  super
  @polymorph_parameter = Parameter::PolymorphParameterDefinition.new(name, altn: altn)
  @optional = false
end

Instance Attribute Details

#altnObject (readonly)

Returns the value of attribute altn.



54
55
56
# File 'lib/params_ready/query/polymorph_predicate.rb', line 54

def altn
  @altn
end

#nameObject (readonly)

Returns the value of attribute name.



54
55
56
# File 'lib/params_ready/query/polymorph_predicate.rb', line 54

def name
  @name
end

#polymorph_parameterObject (readonly)

Returns the value of attribute polymorph_parameter.



54
55
56
# File 'lib/params_ready/query/polymorph_predicate.rb', line 54

def polymorph_parameter
  @polymorph_parameter
end

Instance Method Details

#finishObject



69
70
71
72
# File 'lib/params_ready/query/polymorph_predicate.rb', line 69

def finish
  @polymorph_parameter.finish
  super
end