Class: Savedsearch

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rawss) ⇒ Savedsearch

Returns a new instance of Savedsearch.



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

def initialize(rawss)
  @name = rawss["name"]
  paramlist = rawss["ParameterList"]

  @parameterlist = Array.new

  if paramlist.class == Array
    paramlist.each do |param|
      @parameterlist << SavedsearchParameter.new(param)
    end
  else
    @parameterlist << SavedsearchParameter.new(paramlist)
  end

  @folderlist = Array.new
  @folderlist << rawss["FolderList"]
end

Instance Attribute Details

#folderlistObject (readonly)

Returns the value of attribute folderlist.



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

def folderlist
  @folderlist
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#parameterlistObject (readonly)

Returns the value of attribute parameterlist.



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

def parameterlist
  @parameterlist
end