Class: Sourcetype

Inherits:
Object
  • Object
show all
Defined in:
lib/refworks/properties/sourcetypes/sourcetype.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rawtype) ⇒ Sourcetype

Returns a new instance of Sourcetype.



4
5
6
7
# File 'lib/refworks/properties/sourcetypes/sourcetype.rb', line 4

def initialize(rawtype)
  @name = rawtype["__content__"]
  @id = rawtype["id"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



2
3
4
# File 'lib/refworks/properties/sourcetypes/sourcetype.rb', line 2

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



2
3
4
# File 'lib/refworks/properties/sourcetypes/sourcetype.rb', line 2

def name
  @name
end