Class: SavedsearchParameter

Inherits:
Object
  • Object
show all
Defined in:
lib/refworks/savedsearch/savedsearch_parameter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rawparam) ⇒ SavedsearchParameter

Returns a new instance of SavedsearchParameter.



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/refworks/savedsearch/savedsearch_parameter.rb', line 4

def initialize(rawparam)

  comps = rawparam["Parameter"]

  @components = Array.new

  if comps.class == Array
    comps.each do |comp|
      @components << SavedsearchParameterComponent.new(comp)
    end
  else
    @components << SavedsearchParameterComponent.new(comps)
  end
end

Instance Attribute Details

#componentsObject (readonly)

Returns the value of attribute components.



2
3
4
# File 'lib/refworks/savedsearch/savedsearch_parameter.rb', line 2

def components
  @components
end