Class: Openname::Org
- Inherits:
-
Object
- Object
- Openname::Org
- Defined in:
- lib/openname.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#relationship ⇒ Object
readonly
Returns the value of attribute relationship.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json) ⇒ Org
constructor
A new instance of Org.
Constructor Details
#initialize(json) ⇒ Org
Returns a new instance of Org.
235 236 237 238 239 |
# File 'lib/openname.rb', line 235 def initialize(json) @url = json["url"] if json["url"] @relationship = json["relationship"] if json["relationship"] @name = json["name"] if json["name"] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
232 233 234 |
# File 'lib/openname.rb', line 232 def name @name end |
#relationship ⇒ Object (readonly)
Returns the value of attribute relationship.
231 232 233 |
# File 'lib/openname.rb', line 231 def relationship @relationship end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
230 231 232 |
# File 'lib/openname.rb', line 230 def url @url end |
Class Method Details
.from_json(json) ⇒ Object
226 227 228 |
# File 'lib/openname.rb', line 226 def self.from_json(json) Org.new(json) end |