Class: TheCity::Skill
Instance Attribute Summary
Attributes inherited from ApiObject
#error_messages, #marked_for_destruction
Class Method Summary collapse
-
.load_by_id(fund_id) ⇒ Object
Loads the skill by the specified ID.
Instance Method Summary collapse
-
#initialize(reader = nil) ⇒ Skill
constructor
Constructor.
Methods inherited from ApiObject
__tc_attributes, #delete, #initialize_from_json_object, #is_deleted?, #save, #set_attributes, tc_attr_accessor, #to_attributes
Constructor Details
#initialize(reader = nil) ⇒ Skill
Constructor.
23 24 25 26 27 28 29 30 |
# File 'lib/api/skill.rb', line 23 def initialize(reader = nil) @writer_object = SkillWriter if reader.is_a?(SkillReader) initialize_from_json_object(reader.load_feed) elsif reader.is_a?(Hash) initialize_from_json_object(reader) end end |
Class Method Details
.load_by_id(fund_id) ⇒ Object
Loads the skill by the specified ID.
Returns a new TheCity::Skill object.
15 16 17 18 |
# File 'lib/api/skill.rb', line 15 def self.load_by_id(fund_id) skill_reader = SkillReader.new(fund_id) self.new(skill_reader) end |