fetcher-microdata 0.0.4 → 0.0.5

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.
@@ -3,10 +3,10 @@ module Fetcher
3
3
  class ArticleSmall < Fetcher::Microdata
4
4
 
5
5
  def initialize *args
6
- if args.length == 2
6
+ if args.length == 3
7
7
  super *args
8
8
  else
9
- raise ArgumentError, "Wrong number of arguments #{args.length} and 2 needed"
9
+ raise ArgumentError, "Wrong number of arguments #{args.length} and 3 needed"
10
10
  end
11
11
  @_type = "http://schema.org/Article/Small"
12
12
  end
@@ -3,10 +3,10 @@ module Fetcher
3
3
  class PersonUser < Fetcher::Microdata
4
4
 
5
5
  def initialize *args
6
- if args.length == 1
6
+ if args.length == 2
7
7
  super *args
8
8
  else
9
- raise ArgumentError, "Wrong number of arguments #{args.length} and 1 needed"
9
+ raise ArgumentError, "Wrong number of arguments #{args.length} and 2 needed"
10
10
  end
11
11
  @_type = 'http://schema.org/Person/User'
12
12
  end
@@ -3,10 +3,10 @@ module Fetcher
3
3
  class Review < Fetcher::Microdata
4
4
 
5
5
  def initialize *args
6
- if args.length == 2
6
+ if args.length == 3
7
7
  super *args
8
8
  else
9
- raise ArgumentError, "Wrong number of arguments #{args.length} and 2 needed"
9
+ raise ArgumentError, "Wrong number of arguments #{args.length} and 3 needed"
10
10
  end
11
11
  @_type = "http://schema.org/Review"
12
12
  end
@@ -1,5 +1,5 @@
1
1
  module Fetcher
2
2
  class Microdata
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -8,12 +8,12 @@ describe Fetcher::Microdata::ArticleSmall do
8
8
  end
9
9
  end
10
10
 
11
- it 'should raise wrong number of argument if the count of arguments is distinct of 2' do
11
+ it 'should raise wrong number of argument if the count of arguments is distinct of 3' do
12
12
  expect {
13
- Fetcher::Microdata::ArticleSmall.new "a", "b", "c"
13
+ Fetcher::Microdata::ArticleSmall.new "a", "b", "c", "d"
14
14
  }.to raise_error
15
15
  end
16
-
16
+
17
17
  it 'should inherit from Fetcher::Microdata' do
18
18
  Fetcher::Microdata::ArticleSmall.superclass.should == Fetcher::Microdata
19
19
  end
@@ -12,7 +12,7 @@ describe Fetcher::Microdata::PersonUser do
12
12
  Fetcher::Microdata::PersonUser.superclass.should == Fetcher::Microdata
13
13
  end
14
14
 
15
- it 'should raise wrong number of argument if the count of arguments is distinct of 1' do
15
+ it 'should raise wrong number of argument if the count of arguments is distinct of 2' do
16
16
  expect {
17
17
  Fetcher::Microdata::PersonUser.new "a", "b", "c"
18
18
  }.to raise_error
@@ -12,9 +12,9 @@ describe Fetcher::Microdata::Review do
12
12
  Fetcher::Microdata::Review.superclass.should == Fetcher::Microdata
13
13
  end
14
14
 
15
- it 'should raise wrong number of argument if the count of arguments is distinct of 2' do
15
+ it 'should raise wrong number of argument if the count of arguments is distinct of 3' do
16
16
  expect {
17
- Fetcher::Microdata::Review.new "a", "b", "c"
17
+ Fetcher::Microdata::Review.new "a", "b", "c", "d"
18
18
  }.to raise_error
19
19
  end
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fetcher-microdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: