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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8489fec0a195b80c795eb17a897b2db6845266a
4
- data.tar.gz: 7e904e09dbb774f525663ba9176d6f8b7b76af70
3
+ metadata.gz: 7fa9f93fe46b83f9c373f43e77123f2a58ab2f7d
4
+ data.tar.gz: 2075f8635430689f6b37793d7f7c4acd8361fd32
5
5
  SHA512:
6
- metadata.gz: eef68b2dac1d722e39ccdb7d05907c26f60d56e95335b27e6063e11778f22ece6f32f8fb2cb76daf451ffce91dd09bef84b586a1092c804b4620b3d02a5c7d05
7
- data.tar.gz: 534f5bfea5d308f9d5d1c6b23c8c1fd0715a2b89b3d4dd12bf5ec4a0a592b4c25e4b8680804e1a7431be95a67dd7fb4afa83430c7d1fa60686eecca1c8d8e08c
6
+ metadata.gz: e03ae1836c08adc1ca7f1dc8c7d583a78f6e1b3a4b219de5d471325aad1a979f5d89b25ffe4f27e92b0788d893d44106ea4d9677bd084c17552be60e0d22828c
7
+ data.tar.gz: 216ce18bfedd0b8d6b1cef214f02b79f2c2a3599dbee207b5c5c951a7a60e682638c8c4b3ea23933bf189cdb010d8a29c0d66c9ee144651e0c6a1e3db4d5b6c7
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
@@ -5,5 +5,7 @@ url = "/film/chopping-mall/"
5
5
  f = Letteropend::Film.new(title, url)
6
6
 
7
7
  runtime = f.runtime
8
+ puts "#{title}'s runtime is: #{runtime} minutes"
8
9
 
9
- puts "#{title}'s runtime is #{runtime} minutes"
10
+ tagline = f.tagline
11
+ puts "#{title}'s tagline is: #{tagline}"
@@ -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)
@@ -1,6 +1,6 @@
1
1
  require 'nokogiri'
2
2
  require 'open-uri'
3
- require_relative './Film'
3
+ require_relative './film'
4
4
 
5
5
  module Letteropend
6
6
  class List
@@ -1,3 +1,3 @@
1
1
  module Letteropend
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.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.0.0
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