sdl-ng 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.
@@ -1,10 +1,6 @@
1
- module SDL
2
- module Types
3
- class SDLString < SDLSimpleType
4
- include SDLType
1
+ class SDL::Types::SDLString < SDL::Types::SDLSimpleType
2
+ include SDL::Types::SDLType
5
3
 
6
- wraps String
7
- codes :string, :str
8
- end
9
- end
4
+ wraps String
5
+ codes :string, :str
10
6
  end
@@ -1,31 +1,27 @@
1
- module SDL
2
- module Types
3
- ##
4
- # An SDLType is a wrapper around a basic Ruby type
5
- module SDLType
6
- def self.included(base)
7
- base.extend ClassMethods
8
- end
1
+ ##
2
+ # An SDLType is a wrapper around a basic Ruby type
3
+ module SDL::Types::SDLType
4
+ def self.included(base)
5
+ base.extend ClassMethods
6
+ end
9
7
 
10
- module ClassMethods
11
- ## The Ruby type, which is to be wrapped
12
- attr :wrapped_type
8
+ module ClassMethods
9
+ ## The Ruby type, which is to be wrapped
10
+ attr :wrapped_type
13
11
 
14
- ## The codes, which are to be used to refer to this type
15
- attr :codes
12
+ ## The codes, which are to be used to refer to this type
13
+ attr :codes
16
14
 
17
- ##
18
- # Sets the wrapped Ruby type
19
- def wraps(type)
20
- @wrapped_type = type
21
- end
15
+ ##
16
+ # Sets the wrapped Ruby type
17
+ def wraps(type)
18
+ @wrapped_type = type
19
+ end
22
20
 
23
- ##
24
- # Registers the codes +symbols+ to be used to refer to this type
25
- def codes(*symbols)
26
- @codes = symbols
27
- end
28
- end
21
+ ##
22
+ # Registers the codes +symbols+ to be used to refer to this type
23
+ def codes(*symbols)
24
+ @codes = symbols
29
25
  end
30
26
  end
31
27
  end
@@ -1,20 +1,16 @@
1
1
  require 'uri'
2
2
 
3
- module SDL
4
- module Types
5
- class SDLUrl < SDLSimpleType
6
- include SDLType
3
+ class SDL::Types::SDLUrl < SDL::Types::SDLSimpleType
4
+ include SDL::Types::SDLType
7
5
 
8
- wraps URI
9
- codes :uri, :url
6
+ wraps URI
7
+ codes :uri, :url
10
8
 
11
- def from_string(string_value)
12
- begin
13
- URI.parse string_value
14
- rescue URI::InvalidURIError
15
- throw "Invalid URI: #{string_value}"
16
- end
17
- end
9
+ def from_string(string_value)
10
+ begin
11
+ URI.parse string_value
12
+ rescue URI::InvalidURIError
13
+ throw "Invalid URI: #{string_value}"
18
14
  end
19
15
  end
20
16
  end
data/lib/sdl/util.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require_relative 'util/nokogiri'
2
2
  require_relative 'util/documentation'
3
+ require_relative 'util/verbs'
3
4
 
4
5
  I18n.load_path << File.join(__dir__, 'translations', 'en.yml')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdl-ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Slawik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-06 00:00:00.000000000 Z
11
+ date: 2014-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport