Class: Importfilter
- Inherits:
-
Object
- Object
- Importfilter
- Defined in:
- lib/refworks/importfilter/importfilter.rb
Instance Attribute Summary collapse
-
#databases ⇒ Object
readonly
Returns the value of attribute databases.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
Instance Method Summary collapse
-
#initialize(rawfilter) ⇒ Importfilter
constructor
A new instance of Importfilter.
Constructor Details
#initialize(rawfilter) ⇒ Importfilter
Returns a new instance of Importfilter.
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/refworks/importfilter/importfilter.rb', line 4 def initialize(rawfilter) @name = rawfilter["Name"] @id = rawfilter["id"] @owner = rawfilter["owner"] @databases = Array.new # Promote all returned database values to arrays in the object, even if one database returned, for consistency if rawfilter["Database"].class == Array @databases = rawfilter["Database"] else @databases << rawfilter["Database"] end end |
Instance Attribute Details
#databases ⇒ Object (readonly)
Returns the value of attribute databases.
2 3 4 |
# File 'lib/refworks/importfilter/importfilter.rb', line 2 def databases @databases end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/refworks/importfilter/importfilter.rb', line 2 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/refworks/importfilter/importfilter.rb', line 2 def name @name end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
2 3 4 |
# File 'lib/refworks/importfilter/importfilter.rb', line 2 def owner @owner end |