Class: FortyTwo::Response::Base
- Inherits:
-
Object
- Object
- FortyTwo::Response::Base
- Defined in:
- lib/fortytwo/responses/base.rb
Direct Known Subclasses
Model::Campus, Model::Cursus, Model::CursusUser, Model::ExpertiseUser, Model::Language, Model::Project, Model::ProjectUser, Model::Skill, Model::User, User
Instance Method Summary collapse
-
#initialize(json) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(json) ⇒ Base
4 5 6 7 8 9 10 11 |
# File 'lib/fortytwo/responses/base.rb', line 4 def initialize(json) return if json.nil? json.each do |key, value| key = key.chomp('?') if key.end_with?('?') instance_variable_set("@#{key}", value) end end |