letteropend 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +17 -0
- data/examples/getFilmDetails.rb +3 -1
- data/lib/letteropend/film.rb +11 -1
- data/lib/letteropend/list.rb +1 -1
- data/lib/letteropend/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fa9f93fe46b83f9c373f43e77123f2a58ab2f7d
|
4
|
+
data.tar.gz: 2075f8635430689f6b37793d7f7c4acd8361fd32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e03ae1836c08adc1ca7f1dc8c7d583a78f6e1b3a4b219de5d471325aad1a979f5d89b25ffe4f27e92b0788d893d44106ea4d9677bd084c17552be60e0d22828c
|
7
|
+
data.tar.gz: 216ce18bfedd0b8d6b1cef214f02b79f2c2a3599dbee207b5c5c951a7a60e682638c8c4b3ea23933bf189cdb010d8a29c0d66c9ee144651e0c6a1e3db4d5b6c7
|
data/.gitignore
ADDED
data/examples/getFilmDetails.rb
CHANGED
data/lib/letteropend/film.rb
CHANGED
@@ -3,7 +3,7 @@ require "open-uri"
|
|
3
3
|
|
4
4
|
module Letteropend
|
5
5
|
class Film
|
6
|
-
attr_reader :title, :url, :runtime
|
6
|
+
attr_reader :title, :url, :runtime, :tagline
|
7
7
|
def initialize(title, url, callbacks={})
|
8
8
|
@title = title
|
9
9
|
@url = url
|
@@ -17,6 +17,13 @@ module Letteropend
|
|
17
17
|
end
|
18
18
|
@runtime
|
19
19
|
end
|
20
|
+
|
21
|
+
def tagline
|
22
|
+
if !@pulled
|
23
|
+
pull_data
|
24
|
+
end
|
25
|
+
@tagline
|
26
|
+
end
|
20
27
|
|
21
28
|
def pull_data
|
22
29
|
if @callbacks[:pulling_film]
|
@@ -34,6 +41,9 @@ module Letteropend
|
|
34
41
|
else
|
35
42
|
@runtime = 0
|
36
43
|
end
|
44
|
+
|
45
|
+
# get the tagline for the film
|
46
|
+
@tagline = page.css(".tagline").text
|
37
47
|
|
38
48
|
if @callbacks[:pulled_film]
|
39
49
|
@callbacks[:pulled_film].call(self)
|
data/lib/letteropend/list.rb
CHANGED
data/lib/letteropend/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letteropend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Jurman
|
@@ -59,6 +59,7 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- .gitignore
|
62
63
|
- Gemfile
|
63
64
|
- LICENSE.txt
|
64
65
|
- README.md
|