letteropend 1.1.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fa9f93fe46b83f9c373f43e77123f2a58ab2f7d
4
- data.tar.gz: 2075f8635430689f6b37793d7f7c4acd8361fd32
3
+ metadata.gz: a6cdb0d4f3c01c57f54e2ec50cf5e6a4db37ac1e
4
+ data.tar.gz: 9ebe34eea4c67947da344db67b8dea136c3ef0e6
5
5
  SHA512:
6
- metadata.gz: e03ae1836c08adc1ca7f1dc8c7d583a78f6e1b3a4b219de5d471325aad1a979f5d89b25ffe4f27e92b0788d893d44106ea4d9677bd084c17552be60e0d22828c
7
- data.tar.gz: 216ce18bfedd0b8d6b1cef214f02b79f2c2a3599dbee207b5c5c951a7a60e682638c8c4b3ea23933bf189cdb010d8a29c0d66c9ee144651e0c6a1e3db4d5b6c7
6
+ metadata.gz: ccd759632bc898725b6293eb53e3f3145e4a492d3894a8e20d8fb581e0cc6ddcc82613e065246284609a911b5752100cfdadad244ddb3001baa64efada72e8cf
7
+ data.tar.gz: 896f9ba1a0f915169d1ed6d4621cad9060208296cf93375178fc9942b628b9d8b2cb3ffc0577a61ad65431eb6657e3a5e557fe43013d669cd0f7d255fb29fa59
@@ -9,3 +9,6 @@ puts "#{title}'s runtime is: #{runtime} minutes"
9
9
 
10
10
  tagline = f.tagline
11
11
  puts "#{title}'s tagline is: #{tagline}"
12
+
13
+ overview = f.overview
14
+ puts "#{title}'s overview is: #{overview}"
@@ -3,7 +3,7 @@ require "open-uri"
3
3
 
4
4
  module Letteropend
5
5
  class Film
6
- attr_reader :title, :url, :runtime, :tagline
6
+ attr_reader :title, :url, :runtime, :tagline, :overview
7
7
  def initialize(title, url, callbacks={})
8
8
  @title = title
9
9
  @url = url
@@ -25,6 +25,13 @@ module Letteropend
25
25
  @tagline
26
26
  end
27
27
 
28
+ def overview
29
+ if !@pulled
30
+ pull_data
31
+ end
32
+ @overview
33
+ end
34
+
28
35
  def pull_data
29
36
  if @callbacks[:pulling_film]
30
37
  @callbacks[:pulling_film].call(self)
@@ -44,6 +51,9 @@ module Letteropend
44
51
 
45
52
  # get the tagline for the film
46
53
  @tagline = page.css(".tagline").text
54
+
55
+ # get the overview for the film
56
+ @overview = page.css("div.truncate").text.strip
47
57
 
48
58
  if @callbacks[:pulled_film]
49
59
  @callbacks[:pulled_film].call(self)
@@ -1,3 +1,3 @@
1
1
  module Letteropend
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
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.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Jurman