adamtanner 0.0.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -1
- data/Gemfile +1 -2
- data/LICENSE +22 -0
- data/README.md +10 -18
- data/adamtanner.gemspec +18 -18
- data/bin/adamtanner +88 -4
- metadata +36 -22
- data/lib/adamtanner/resume.rb +0 -5
- data/lib/adamtanner.rb +0 -72
- data/lib/block_party/dsl.rb +0 -67
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8679f42247fdc9fec06d1081a0bbcb00f19473b1
|
4
|
+
data.tar.gz: d51a01084a394c8e94f543add84b958273b416bd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 00ff800cf9b76c74f31a038b2a1f11f9a903941005e30b75a390028f2bdfb6cebcf881b26b3e84b024e9e8304143925a7df02e57df8eef9dd13c37b9353b92de
|
7
|
+
data.tar.gz: 5a222380ff41e160a1e105d41fc3145081f05d9e2a864445bfbb6f1d0d837b1477f97071f537a138a2639b4a3d4d08d28d791cf777d47e9eb38fe23e2a8d62a3
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Adam Tanner
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,27 +1,19 @@
|
|
1
|
-
Adam Tanner
|
2
|
-
==================
|
1
|
+
# Adam Tanner
|
3
2
|
|
4
|
-
|
3
|
+
## Installation
|
5
4
|
|
6
|
-
|
7
|
-
------------------
|
5
|
+
Add this line to your application's Gemfile:
|
8
6
|
|
9
|
-
|
7
|
+
gem "adamtanner"
|
10
8
|
|
11
|
-
|
9
|
+
And then execute:
|
12
10
|
|
13
|
-
|
11
|
+
$ bundle
|
14
12
|
|
15
|
-
|
16
|
-
require 'adamtanner'
|
13
|
+
Or install it yourself as:
|
17
14
|
|
18
|
-
|
19
|
-
Adam.name #=> "Adam Tanner"
|
20
|
-
Adam.experience.bullhorn_marketing.position #=> "Web Developer"
|
15
|
+
$ gem install adamtanner
|
21
16
|
|
17
|
+
## Usage
|
22
18
|
|
23
|
-
|
24
|
-
------------------
|
25
|
-
|
26
|
-
* Extend the `adamtanner` executable to start a server and display a web version of my resume.
|
27
|
-
* Extend the `adamtanner` executable to export a PDF of my resume.
|
19
|
+
$ adamtanner
|
data/adamtanner.gemspec
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
|
5
|
-
Gem::Specification.new do |
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "adamtanner"
|
7
|
+
spec.version = "2.0.0"
|
8
|
+
spec.authors = ["Adam Tanner"]
|
9
|
+
spec.email = ["adam@adamtanner.org"]
|
10
|
+
spec.description = "Adam Tanner, the software engineer."
|
11
|
+
spec.summary = "Adam Tanner, the software engineer."
|
12
|
+
spec.homepage = "https://github.com/adamtanner/adamtanner"
|
13
|
+
spec.license = "MIT"
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
spec.files = `git ls-files`.split($/)
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^spec/})
|
18
|
+
spec.require_paths = ["lib"]
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
s.add_runtime_dependency "coderay"
|
20
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
21
|
+
spec.add_development_dependency "rake"
|
22
22
|
end
|
data/bin/adamtanner
CHANGED
@@ -1,6 +1,90 @@
|
|
1
|
-
|
1
|
+
puts <<RESUME
|
2
2
|
|
3
|
-
|
3
|
+
IIIIIIIIII?+??:::~~==+==~~~~::::===++==+====~=~::::~~~~:====~:~::~==77I777777777
|
4
|
+
IIIIIIIIII?+?+~::~~~=++=~~=~~~========+++=====~~~:::~~~~==~~~:,::~~+77I777777777
|
5
|
+
IIIIIIII7II+?+=::::~=====~=++++++=+===================~~==~::::,~===77I777777777
|
6
|
+
IIIIIIIIII77777~:::~~===~=++++++++++=++==========+===~=~=~~::,,:~==?I7I777777777
|
7
|
+
IIIIIIIIII7777I+::::::=~~+++++======~=~==~~===========~~~~::::::~~?7I7II77777777
|
8
|
+
IIIIIIIIII7777I7:::::~~~~++++======~~~:~~~~~~~========~~~:::,,:?IIIIIIII77777777
|
9
|
+
IIIIIIII777777I7?:::~:~~~=++======~~~=~~~~~~~~~~~=====~::::,,,:IIIIIIIII77777777
|
10
|
+
IIIIIIII77I777I77:,:::::~==+++==++==~~::~:~~~~~~=====~::,,,,:,++IIIIIII777777777
|
11
|
+
IIIIIIIII7I777777I::,:::~~++++++++==~~~~~:~~==~=====~~:,:,,,,:IIIIIIIII777777777
|
12
|
+
IIIII?????????7777?::,::~~==++====~~~~~~~~~~========~::,,,,,:?IIIIIIIII777777777
|
13
|
+
IIII?+???+??+II?=77I,,::::~~~==~=~~~~:=~~~~:~~=~=~=~:::,,,,,?IIIIIIIIII777777777
|
14
|
+
IIII???????I?+II?777=:,::::~~~~::~~~~~~~~~~~:~:~~~~~:,:,,,:=IIIIIIIIIII7IIIII777
|
15
|
+
IIII???????7I7777777+~:,,,:,:~:::::::::~::,:,:::::::,,,,,:I7III7IIIIIIIIIIIIII77
|
16
|
+
IIIIIIIIIII7777I7777+==:::::::::,:::::::::::,,:,:,,,,,,,:?IIIIIIIIIIIIIIIIIIIIII
|
17
|
+
IIIIIIIIIIII77 ? 777+++=~:,,,,,,::,,::,,,,,,,,,,,,,,,,,:~?IIIIIIIIII?IIIIIIIIIII
|
18
|
+
IIIIIIIIIIII777?7777+++==~:,,:,:,:,,,,,,,,,,,,...,,,,,:~~?IIIIIIIIII?IIIIIIIIIII
|
19
|
+
???IIIIIIIII777I7777+++=+=~:,,,,,,,,,..,,,,,.,..,..,,::~~IIIIIIIIIII??IIIIIIIIII
|
20
|
+
??????IIIIII77777777+++++===~:,,,,,,,.,..,....,..,,::::~~?IIIIIIIIII??IIIII?IIII
|
21
|
+
???????IIIII7777777I++++++===~~,,,,.,...........,,::~::~~IIIIIIIIII???II?II?IIII
|
22
|
+
+??????IIIII7777 77II+?+++======~:,,..........,:::~::::~~?IIIIIII?????I?I???I???
|
23
|
+
++??????IIII777777~I7???+++=========~~~~:~:::::~::~~~:::=+I?IIIII?????I?????????
|
24
|
+
+++??????III7777:,I7I7I??+++========~=~~~~~~:~~~~~~:~~:~=~,?IIIIII??????????????
|
25
|
+
+++???????III77,,,7I7777+?+++=========~~~~~~::~~~~~~:~~+++,.=III?I??????????????
|
26
|
+
++++??????III:,,,,77I77I7I??++======~~~~~~~~~~~~~~~:===++++..,II????????????????
|
27
|
+
+++++??????:,,,,,=?77777I7I=++=======~~~~~~~~~~~~~,=~+++?++...,:????????????????
|
28
|
+
+++?????,,,,,,,,.=7I7777I777I=======~~~~~~~~~~~~:===++??+++:....,,=?????????????
|
29
|
+
+++?~:,,,,,,,,,..?I7777I777?77=======~~~~~~~~~~:=+==?????++~....,,,,,,??????????
|
30
|
+
::,,,,,,,,,,,.,,.+=I7777777777?7~====~~~~~~~~:=+++??????=?+~......,,,,,,,,=????I
|
31
|
+
,,,,,,,,,,,.,,,..+I7I7777~77+I777?~==~~~~~~~=?+I+II?II?~?=+=.......,,,,,,,,,,,:?
|
32
|
+
,,,,,,,,,,.,,,...~I777+777+777II777?~~~~~~~IIII?III?+I+??+++=.......,,,,,,,,,,,,
|
33
|
+
,,,,,,,,.,,,,,...~I7+77777777I7777+7=III?I~7I?+IIIIII?=?+++++........,,,,,..,,,,
|
34
|
+
...,,,.,,,,,,....,777=7I77777?77??7=:I~::::~~+I?I?II?II???++=,........,.........
|
35
|
+
,....,,,,,,,,....,I?77=777I777=77?,+:,,::::,,.:I++II?I???=??=:..................
|
36
|
+
,,.,,,,.,,.,,.....I7?77I777+?77+,,,,,,,,,,,,,,,,.II+I???????++.............,....
|
37
|
+
.,,,.,.,,,,,......I77777I777+I,,,,,,,,,,,,,,,,,,..~II:??+???++...............,..
|
38
|
+
,,..,.,,...,.....,+77777777I~.,,,,,,,,,,,,,,,,,..::::I?+??=~++..................
|
39
|
+
.,...,...,........+I777+77:===,,,,,,,,,,,,,,,,,.:???~,=????+++..................
|
40
|
+
,..,,,............==7I77==~+II=,,,,,,,,,:,,,,,.,??????+:?I?==+..................
|
41
|
+
....,,.,..........~+77+~II?IIII=,,,,,,,,,,,,...~+??????+=~~+++..................
|
42
|
+
....,.............,+++IIIIIIII??~,,,,,,,,,,,..:+?+??+??~??++=+,.................
|
43
|
+
..,...............:++IIIIII++++??,,,,....,,,..~??~??=?????==++,.................
|
44
|
+
..................:+?IIIIIIIII???,,,,,,,,,,,..???~??~???????+:,.................
|
45
|
+
...................+?IIIII?????+,,,,,,:,,,,,,,+??+??+???????++:.................
|
46
|
+
...................~?IIIIIIII??,,,,,,,,,,,,,,,+?????????????++~.................
|
47
|
+
...................:?I?++?????+,,,,,,,,,,,,,,,,??????????????+~.................
|
48
|
+
...................:+?IIIII?I?::,,,:,,,,,,,,,,,??????????????+=.................
|
49
|
+
...................:+???++++??,:,,,,,,,,,,,,,,,,???????????+?+=.................
|
50
|
+
....................+?IIII?=??,,,:,,,,,,,,,,,,,,???????????+??:.................
|
51
|
+
....................++??++=:+?,,,,,,,,,,,,,,,,,,=?+??+??+??+++~.................
|
52
|
+
....................~+?I???+??,,,,,,,,,,,,,,,,,,,?~??~??~??+++=.................
|
53
|
+
....................:+?????+++,,,,,,,,,,,,,,,,,,,?~??+??~????++.................
|
4
54
|
|
5
|
-
|
6
|
-
|
55
|
+
ADAM TANNER
|
56
|
+
WEB DEVELOPER AT GOOGLE INC
|
57
|
+
|
58
|
+
EMAIL adam@adamtanner.org
|
59
|
+
GITHUB adamtanner
|
60
|
+
TWITTER adamtanner
|
61
|
+
LINKEDIN adamtanner
|
62
|
+
|
63
|
+
I'VE GOT SKILLS LIKE YOU WOULDN'T BELIEVE
|
64
|
+
|
65
|
+
+++++ RUBY
|
66
|
+
+++++ RUBY ON RAILS
|
67
|
+
++++ SCALING RUBY APPLICATIONS
|
68
|
+
++++ HTML/5
|
69
|
+
++++ CSS
|
70
|
+
++++ JAVASCRIPT
|
71
|
+
++++ SQL
|
72
|
+
++++ AGILE / SCRUM
|
73
|
+
++++ BOULDERING
|
74
|
+
++++ SINGING
|
75
|
+
+++ LEADERSHIP
|
76
|
+
+++ ESPRESSO DRINKS
|
77
|
+
+++ GO
|
78
|
+
|
79
|
+
PREVIOUSLY BUILDER OF AWESOME THINGS AT
|
80
|
+
|
81
|
+
++ BULLHORN MARKETING [http://bullhorncreative.com]
|
82
|
+
++ RUBIDINE / FINESLACKS [http://rubidine.com]
|
83
|
+
++ PROMPTSITE [http://promptsite.com]
|
84
|
+
|
85
|
+
KENTUCKY PROUD
|
86
|
+
|
87
|
+
RESUME
|
88
|
+
|
89
|
+
print " INTERESTED? "
|
90
|
+
gets
|
metadata
CHANGED
@@ -1,28 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adamtanner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Adam Tanner
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-23 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
requirement:
|
17
|
-
none: false
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
20
32
|
- !ruby/object:Gem::Version
|
21
33
|
version: '0'
|
22
|
-
type: :
|
34
|
+
type: :development
|
23
35
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Adam Tanner, the software engineer.
|
26
42
|
email:
|
27
43
|
- adam@adamtanner.org
|
28
44
|
executables:
|
@@ -32,35 +48,33 @@ extra_rdoc_files: []
|
|
32
48
|
files:
|
33
49
|
- .gitignore
|
34
50
|
- Gemfile
|
51
|
+
- LICENSE
|
35
52
|
- README.md
|
36
53
|
- Rakefile
|
37
54
|
- adamtanner.gemspec
|
38
55
|
- bin/adamtanner
|
39
|
-
|
40
|
-
|
41
|
-
-
|
42
|
-
|
43
|
-
licenses: []
|
56
|
+
homepage: https://github.com/adamtanner/adamtanner
|
57
|
+
licenses:
|
58
|
+
- MIT
|
59
|
+
metadata: {}
|
44
60
|
post_install_message:
|
45
61
|
rdoc_options: []
|
46
62
|
require_paths:
|
47
63
|
- lib
|
48
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
65
|
requirements:
|
51
|
-
- -
|
66
|
+
- - '>='
|
52
67
|
- !ruby/object:Gem::Version
|
53
68
|
version: '0'
|
54
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
70
|
requirements:
|
57
|
-
- -
|
71
|
+
- - '>='
|
58
72
|
- !ruby/object:Gem::Version
|
59
73
|
version: '0'
|
60
74
|
requirements: []
|
61
75
|
rubyforge_project:
|
62
|
-
rubygems_version:
|
76
|
+
rubygems_version: 2.0.3
|
63
77
|
signing_key:
|
64
|
-
specification_version:
|
65
|
-
summary: Adam Tanner
|
78
|
+
specification_version: 4
|
79
|
+
summary: Adam Tanner, the software engineer.
|
66
80
|
test_files: []
|
data/lib/adamtanner/resume.rb
DELETED
data/lib/adamtanner.rb
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
require "adamtanner/resume"
|
2
|
-
|
3
|
-
Adam = Resume.new do
|
4
|
-
name "Adam Tanner"
|
5
|
-
date_of_birth Date.parse("November 30th, 1989")
|
6
|
-
version "0.0.2"
|
7
|
-
|
8
|
-
home do
|
9
|
-
street "124 Inverness Lane"
|
10
|
-
city "Winchester"
|
11
|
-
state "Kentucky"
|
12
|
-
zipcode 40391
|
13
|
-
web URI.parse("http://adamtanner.org") # Why isn't this up yet?!
|
14
|
-
github URI.parse("http://github.com/adamtanner")
|
15
|
-
twitter URI.parse("http://twitter.com/adamtanner")
|
16
|
-
end
|
17
|
-
|
18
|
-
contact do
|
19
|
-
phone "859.771.6563"
|
20
|
-
email "adam@adamtanner.org"
|
21
|
-
end
|
22
|
-
|
23
|
-
experience do
|
24
|
-
bullhorn_marketing do
|
25
|
-
company "Bullhorn Marketing"
|
26
|
-
web URI.parse("http://bullhornwill.com")
|
27
|
-
position "Web Developer"
|
28
|
-
responsibilites [
|
29
|
-
"Build awesome Ruby-based web applications using Sinatra and Rails for awesome clients.",
|
30
|
-
"Cut up and implement design mockups for brochure-style websites with chef-like mastery. (Built on Radiant CMS)",
|
31
|
-
"Build and maintain the ol' Linodes.",
|
32
|
-
"Wear the IT hat on unfortunate occasions."
|
33
|
-
]
|
34
|
-
full_time Date.parse("August 2011")..Date.today
|
35
|
-
contracting Date.parse("February 2011")..Date.parse("August 2011")
|
36
|
-
end
|
37
|
-
|
38
|
-
promptsite do
|
39
|
-
company "PromptSite"
|
40
|
-
web URI.parse("http://promptsite.com")
|
41
|
-
position "Web Developer"
|
42
|
-
responsibilities [
|
43
|
-
"Use mad front-end ninja skills to take pretty pictures and turn them into e-living, bit-breathing, websites. (On Radiant CMS, of course)",
|
44
|
-
"Work on sweet Radiant extensions for everything from RSS Feeds to Salesforce integrations.",
|
45
|
-
"Shepherd of the Linodes"
|
46
|
-
]
|
47
|
-
contracting Date.parse("February 2009")..Date.parse("June 2011")
|
48
|
-
end
|
49
|
-
|
50
|
-
rubidine do
|
51
|
-
company "Rubidine"
|
52
|
-
web URI.parse("http://rubidine.com")
|
53
|
-
position "Web Developer"
|
54
|
-
responsibilities [
|
55
|
-
"Take the MBTI and make it kick-ass with a sweet JavaScript based game using jQuery, jQuery UI,
|
56
|
-
and Sammy.js with a dash of Sinatra and DataMapper bringin' up the back for good measure.",
|
57
|
-
"Abstract out an old billing application to give it life outside of the church."
|
58
|
-
]
|
59
|
-
contracting Date.parse("June 2010")..Date.parse("August 2010")
|
60
|
-
end
|
61
|
-
|
62
|
-
fineslacks do
|
63
|
-
company "Fineslacks"
|
64
|
-
web URI.parse("http://fineslacks.com")
|
65
|
-
position "Web Developer"
|
66
|
-
responsibilities [
|
67
|
-
"A healthy dose of refactoring and re-architecting for a Rails-based CMS/hosting platform MVP."
|
68
|
-
]
|
69
|
-
contracting Date.parse("June 2010")..Date.parse("November 2010")
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
data/lib/block_party/dsl.rb
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
module BlockParty
|
2
|
-
class DSL
|
3
|
-
# Creates a new BlockParty::DSL instance.
|
4
|
-
#
|
5
|
-
# @yields Block to be instance_eval'd.
|
6
|
-
def initialize(&block)
|
7
|
-
self.instance_eval(&block)
|
8
|
-
end
|
9
|
-
|
10
|
-
# Dynamically builds a method for each attribute that functions as
|
11
|
-
# both a getter and a setter.
|
12
|
-
#
|
13
|
-
# @param [Symbol] attributes An array of DSL method names
|
14
|
-
# @return nil
|
15
|
-
# @example Defining several DSL methods
|
16
|
-
# dsl_accessor :name, :age, :location
|
17
|
-
#
|
18
|
-
# # Sets the @name variable
|
19
|
-
# name "Adam Tanner"
|
20
|
-
#
|
21
|
-
# # Gets the @name variable
|
22
|
-
# name #=> "Adam Tanner"
|
23
|
-
def dsl_accessor(*attributes)
|
24
|
-
attributes.each do |attribute|
|
25
|
-
unless respond_to?(attribute.to_sym)
|
26
|
-
(class << self; self; end).instance_eval do
|
27
|
-
define_method(attribute.to_sym) do |arguments = nil|
|
28
|
-
return instance_variable_set("@#{attribute}", arguments) if arguments
|
29
|
-
instance_variable_get("@#{attribute}")
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
# Dynamically builds DSL methods for methods that don't exist.
|
37
|
-
# If the method does not have a block it is a normal DSL
|
38
|
-
# method. If the method does have a block then it is a "section"
|
39
|
-
# that will contain other DSL methods.
|
40
|
-
#
|
41
|
-
# @param [Symbol] method The method that was called
|
42
|
-
# @param [Array] arguments An array of arguments passed to the method
|
43
|
-
# @yields The block the method was passed if one exists
|
44
|
-
# @example
|
45
|
-
# BlockParty::DSL.new do
|
46
|
-
# # Is caught by method_missing and creates a DSL accessor
|
47
|
-
# name "Adam Tanner"
|
48
|
-
#
|
49
|
-
# # Is caught by method_missing and creates a new BlockParty::DSL instance
|
50
|
-
# home do
|
51
|
-
# # Is caught by method_missing and creates a DSL accessor in the context
|
52
|
-
# # of the 'home' BlockParty::DSL instance
|
53
|
-
# web URI.parse("http://adamtanner.org")
|
54
|
-
# end
|
55
|
-
# end
|
56
|
-
def method_missing(method, *arguments, &block)
|
57
|
-
dsl_accessor method.to_sym
|
58
|
-
|
59
|
-
if block
|
60
|
-
dsl_block = self.class.new(&block)
|
61
|
-
send(method, dsl_block)
|
62
|
-
else
|
63
|
-
send(method, *arguments)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|