Class: TheCity::Tag
Instance Attribute Summary
Attributes inherited from ApiObject
#error_messages, #marked_for_destruction
Class Method Summary collapse
-
.load_by_id(tag_id) ⇒ Object
Loads the tag by the specified ID.
Instance Method Summary collapse
-
#initialize(json_data = nil) ⇒ Tag
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
Class Method Details
.load_by_id(tag_id) ⇒ Object
Loads the tag by the specified ID.
Returns a new TheCity::Tag object.
15 16 17 18 19 20 |
# File 'lib/api/tag.rb', line 15 def self.load_by_id(tag_id) reader = TagReader.new(tag_id) self.new(reader.load_feed) rescue nil end |