Class: Sink::Tag
- Inherits:
-
Data
- Object
- Data
- Sink::Tag
- Defined in:
- lib/sink/tag.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count
4 5 6 |
# File 'lib/sink/tag.rb', line 4 def count @count end |
#name ⇒ Object (readonly)
Returns the value of attribute name
4 5 6 |
# File 'lib/sink/tag.rb', line 4 def name @name end |
Class Method Details
.from_response(body) ⇒ Object
5 6 7 8 9 |
# File 'lib/sink/tag.rb', line 5 def self.from_response(body) return new(name: body.to_s, count: nil) unless body.is_a?(Hash) new(name: body["name"], count: body["count"]) end |
Instance Method Details
#to_s ⇒ Object
11 |
# File 'lib/sink/tag.rb', line 11 def to_s = name.to_s |