class Filterparams::Parameter

Attributes

alias[RW]
filter[RW]
name[RW]
value[RW]

Public Class Methods

new(name, params = {}) click to toggle source
# File lib/filterparams/obj/parameter.rb, line 5
def initialize(name, params = {})
  self.name = name
  self.filter = params[:filter] || nil
  self.value = params[:value] || nil
  self.alias = params[:alias] || nil
end

Public Instance Methods

equal?(other) click to toggle source
# File lib/filterparams/obj/parameter.rb, line 20
def equal?(other)
  if other.is_a? Parameter
    name == other.name && self.alias == other.alias
  else
    false
  end
end
identification() click to toggle source
# File lib/filterparams/obj/parameter.rb, line 12
def identification
  if self.alias.nil?
    name
  else
    self.alias
  end
end