Class: RailsParam::Coercion::VirtualParam

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_param/coercion/virtual_param.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(param:, options: nil, type: nil) ⇒ VirtualParam

Returns a new instance of VirtualParam.



6
7
8
9
10
11
# File 'lib/rails_param/coercion/virtual_param.rb', line 6

def initialize(param:, options: nil, type: nil)
  @param = param
  @options = options
  @type = type
  argument_validation
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/rails_param/coercion/virtual_param.rb', line 4

def options
  @options
end

#paramObject (readonly)

Returns the value of attribute param.



4
5
6
# File 'lib/rails_param/coercion/virtual_param.rb', line 4

def param
  @param
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/rails_param/coercion/virtual_param.rb', line 4

def type
  @type
end

Instance Method Details

#coerceObject



13
14
15
# File 'lib/rails_param/coercion/virtual_param.rb', line 13

def coerce
  nil
end