Class: Require::Dsl::Args
- Inherits:
-
Array
- Object
- Array
- Require::Dsl::Args
- Defined in:
- lib/require/dsl.rb
Instance Method Summary collapse
- #all(*values) ⇒ Object
- #dsl ⇒ Object
- #gem? ⇒ Boolean
- #get(*values) ⇒ Object
- #load_path? ⇒ Boolean
- #name ⇒ Object
- #path ⇒ Object
- #require? ⇒ Boolean
- #version ⇒ Object
Instance Method Details
#all(*values) ⇒ Object
44 45 46 |
# File 'lib/require/dsl.rb', line 44 def all(*values) dsl.all(*values) if dsl end |
#dsl ⇒ Object
48 49 50 |
# File 'lib/require/dsl.rb', line 48 def dsl self[-1] if self[-1].class == Require::Dsl::Args || self[-1].class == Dsl end |
#gem? ⇒ Boolean
56 57 58 |
# File 'lib/require/dsl.rb', line 56 def gem? self[0] == :gem end |
#get(*values) ⇒ Object
52 53 54 |
# File 'lib/require/dsl.rb', line 52 def get(*values) dsl.get(*values) if dsl end |
#load_path? ⇒ Boolean
60 61 62 |
# File 'lib/require/dsl.rb', line 60 def load_path? self[0] == :load_path end |
#name ⇒ Object
64 65 66 |
# File 'lib/require/dsl.rb', line 64 def name self[1] if gem? && self[1] != dsl end |
#path ⇒ Object
68 69 70 |
# File 'lib/require/dsl.rb', line 68 def path self[1] if (require? || load_path?) && self[1] != dsl end |
#require? ⇒ Boolean
72 73 74 |
# File 'lib/require/dsl.rb', line 72 def require? self[0] == :require end |
#version ⇒ Object
76 77 78 |
# File 'lib/require/dsl.rb', line 76 def version self[2] if self[0] == :gem && self[2] != dsl end |