Class: Sourcetype
- Inherits:
-
Object
- Object
- Sourcetype
- Defined in:
- lib/refworks/properties/sourcetypes/sourcetype.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(rawtype) ⇒ Sourcetype
constructor
A new instance of Sourcetype.
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/refworks/properties/sourcetypes/sourcetype.rb', line 2 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/refworks/properties/sourcetypes/sourcetype.rb', line 2 def name @name end |