Class: Yaggy::MockSpec
- Inherits:
-
Object
- Object
- Yaggy::MockSpec
- Defined in:
- lib/yaggy/mock_spec.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#version ⇒ Object
Returns the value of attribute version.
-
#version_line ⇒ Object
readonly
Returns the value of attribute version_line.
Class Method Summary collapse
Instance Method Summary collapse
- #executables ⇒ Object
- #files ⇒ Object
-
#initialize {|_self| ... } ⇒ MockSpec
constructor
A new instance of MockSpec.
- #method_missing(*args, &block) ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ MockSpec
Returns a new instance of MockSpec.
9 10 11 12 |
# File 'lib/yaggy/mock_spec.rb', line 9 def initialize yield self @@gems[@@current_file] = self end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
6 7 |
# File 'lib/yaggy/mock_spec.rb', line 6 def method_missing(*args, &block) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
29 30 31 |
# File 'lib/yaggy/mock_spec.rb', line 29 def name @name end |
#version ⇒ Object
Returns the value of attribute version.
14 15 16 |
# File 'lib/yaggy/mock_spec.rb', line 14 def version @version end |
#version_line ⇒ Object (readonly)
Returns the value of attribute version_line.
14 15 16 |
# File 'lib/yaggy/mock_spec.rb', line 14 def version_line @version_line end |
Class Method Details
.capture_gemspec_info(gemspec) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/yaggy/mock_spec.rb', line 31 def self.capture_gemspec_info(gemspec) @@gems ||= {} @@current_file = gemspec old_verbose, $VERBOSE = $VERBOSE, nil old_spec = ::Gem::Specification ::Gem.const_set("Specification", ::Yaggy::MockSpec) load gemspec @@gems[@@current_file] ensure Gem.const_set("Specification", ::Yaggy::MockSpec) $VERBOSE = old_verbose end |
Instance Method Details
#executables ⇒ Object
21 22 23 |
# File 'lib/yaggy/mock_spec.rb', line 21 def executables [] end |
#files ⇒ Object
25 26 27 |
# File 'lib/yaggy/mock_spec.rb', line 25 def files [] end |