Class: NicoQuery::ObjectMapper::Description
- Inherits:
-
Object
- Object
- NicoQuery::ObjectMapper::Description
- Defined in:
- lib/nicoquery/object_mapper/description.rb
Instance Attribute Summary collapse
-
#community_references ⇒ Object
readonly
Returns the value of attribute community_references.
-
#movie_references ⇒ Object
readonly
Returns the value of attribute movie_references.
-
#raw_text ⇒ Object
readonly
Returns the value of attribute raw_text.
-
#seiga_references ⇒ Object
readonly
Returns the value of attribute seiga_references.
Instance Method Summary collapse
-
#initialize(raw_text) ⇒ Description
constructor
A new instance of Description.
- #mylist_references ⇒ Object
- #text ⇒ Object
Constructor Details
#initialize(raw_text) ⇒ Description
Returns a new instance of Description.
7 8 9 |
# File 'lib/nicoquery/object_mapper/description.rb', line 7 def initialize(raw_text) @raw_text = raw_text.to_s end |
Instance Attribute Details
#community_references ⇒ Object (readonly)
Returns the value of attribute community_references.
4 5 6 |
# File 'lib/nicoquery/object_mapper/description.rb', line 4 def community_references @community_references end |
#movie_references ⇒ Object (readonly)
Returns the value of attribute movie_references.
4 5 6 |
# File 'lib/nicoquery/object_mapper/description.rb', line 4 def movie_references @movie_references end |
#raw_text ⇒ Object (readonly)
Returns the value of attribute raw_text.
4 5 6 |
# File 'lib/nicoquery/object_mapper/description.rb', line 4 def raw_text @raw_text end |
#seiga_references ⇒ Object (readonly)
Returns the value of attribute seiga_references.
4 5 6 |
# File 'lib/nicoquery/object_mapper/description.rb', line 4 def seiga_references @seiga_references end |
Instance Method Details
#mylist_references ⇒ Object
20 21 22 |
# File 'lib/nicoquery/object_mapper/description.rb', line 20 def mylist_references text.scan(/(?<=mylist\/)\d{1,}/).map(&:to_i) end |
#text ⇒ Object
11 12 13 |
# File 'lib/nicoquery/object_mapper/description.rb', line 11 def text @raw_text end |