Class: Roll::Metadata::FakeGem::Gem::Specification
- Inherits:
-
Object
- Object
- Roll::Metadata::FakeGem::Gem::Specification
- Defined in:
- lib/roll/metadata.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#fake_options ⇒ Object
readonly
Returns the value of attribute fake_options.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Specification
constructor
A new instance of Specification.
- #method_missing(sym, *args) ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ Specification
Returns a new instance of Specification.
313 314 315 316 |
# File 'lib/roll/metadata.rb', line 313 def initialize(&block) @fake_options = {} yield(self) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args) ⇒ Object
317 318 319 320 321 322 323 324 325 |
# File 'lib/roll/metadata.rb', line 317 def method_missing(sym, *args) name = sym.to_s case name when /=$/ @fake_options[name.chomp('=')] = args.first else @fake_options[name] end end |
Instance Attribute Details
#fake_options ⇒ Object (readonly)
Returns the value of attribute fake_options.
312 313 314 |
# File 'lib/roll/metadata.rb', line 312 def @fake_options end |