outline 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/outline.rb +42 -2
- metadata +5 -5
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/outline.rb
CHANGED
@@ -8,6 +8,46 @@ class Hash
|
|
8
8
|
end
|
9
9
|
|
10
10
|
class Outline
|
11
|
+
undef_method :abort
|
12
|
+
undef_method :at_exit
|
13
|
+
undef_method :autoload
|
14
|
+
undef_method :autoload?
|
15
|
+
undef_method :binding
|
16
|
+
undef_method :caller
|
17
|
+
undef_method :catch
|
18
|
+
undef_method :exit
|
19
|
+
undef_method :exit!
|
20
|
+
undef_method :fail
|
21
|
+
undef_method :fork
|
22
|
+
undef_method :format
|
23
|
+
undef_method :gets
|
24
|
+
undef_method :global_variables
|
25
|
+
undef_method :loop
|
26
|
+
undef_method :open
|
27
|
+
undef_method :p
|
28
|
+
undef_method :print
|
29
|
+
undef_method :printf
|
30
|
+
undef_method :raise
|
31
|
+
undef_method :rand
|
32
|
+
undef_method :readline
|
33
|
+
undef_method :readlines
|
34
|
+
undef_method :require
|
35
|
+
undef_method :require_relative
|
36
|
+
undef_method :select
|
37
|
+
undef_method :set_trace_func
|
38
|
+
undef_method :sleep
|
39
|
+
undef_method :spawn
|
40
|
+
undef_method :sprintf
|
41
|
+
undef_method :srand
|
42
|
+
undef_method :syscall
|
43
|
+
undef_method :system
|
44
|
+
undef_method :test
|
45
|
+
undef_method :throw
|
46
|
+
undef_method :trace_var
|
47
|
+
undef_method :trap
|
48
|
+
undef_method :untrace_var
|
49
|
+
undef_method :warn
|
50
|
+
|
11
51
|
class ArgumentWithBlockError < StandardError
|
12
52
|
def to_s; "You cannot give an argument with a block"; end
|
13
53
|
end
|
@@ -25,10 +65,11 @@ class Outline
|
|
25
65
|
# Check to see if incoming data is already an outline
|
26
66
|
# if so, then turn it into a hash
|
27
67
|
|
28
|
-
data = opts[:data].respond_to?(:to_hash) ? opts[:data].to_hash : opts[:data].to_h unless opts[:data].nil?
|
68
|
+
data = opts[:data].respond_to?(:to_hash) ? opts[:data].to_hash : opts[:data].to_h unless opts[:data].nil?
|
29
69
|
|
30
70
|
@parent = opts[:parent]
|
31
71
|
@data = data
|
72
|
+
@data ||= {}
|
32
73
|
|
33
74
|
instance_eval(&blk) if block_given?
|
34
75
|
end
|
@@ -38,7 +79,6 @@ class Outline
|
|
38
79
|
|
39
80
|
meta_def(meth) do |value=nil, &blk|
|
40
81
|
block_given, value_given = !blk.nil?, !value.nil?
|
41
|
-
@data ||= {}
|
42
82
|
|
43
83
|
if !block_given && !value_given
|
44
84
|
@data[meth] = Outline.new(parent: self) unless @data.has_key?(meth)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-26 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: meta_tools
|
16
|
-
requirement: &
|
16
|
+
requirement: &70251469342300 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.2.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70251469342300
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &70251469341820 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 2.6.0
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70251469341820
|
36
36
|
description: Easily set configurations on your Ruby apps.
|
37
37
|
email: c00lryguy@gmail.com
|
38
38
|
executables: []
|