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.



149
150
151
152
153
# File 'lib/openname.rb', line 149

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.



146
147
148
# File 'lib/openname.rb', line 146

def name
  @name
end

#relationshipObject (readonly)

Returns the value of attribute relationship.



145
146
147
# File 'lib/openname.rb', line 145

def relationship
  @relationship
end

#urlObject (readonly)

Returns the value of attribute url.



144
145
146
# File 'lib/openname.rb', line 144

def url
  @url
end

Class Method Details

.from_json(json) ⇒ Object



140
141
142
# File 'lib/openname.rb', line 140

def self.from_json(json)
  Org.new(json)
end