Class: Openname::Org

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



232
233
234
# File 'lib/openname.rb', line 232

def name
  @name
end

#relationshipObject (readonly)

Returns the value of attribute relationship.



231
232
233
# File 'lib/openname.rb', line 231

def relationship
  @relationship
end

#urlObject (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