389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
|
# File 'lib/manager.rb', line 389
def hide spec
bad_spec " `hide` must be followed by `spec`." unless spec.instance_of?(Spec)
case @type
when :module
bad_spec " `hide` can only apply to a method or a constant (including module)."
when :module_as_constant
modul = @specs[@modul.const_get(@feature.to_s)][[:module, nil]]
bad_spec " Conflicting `hide` and `move`." if modul.documentation and modul.hidden.!
modul.documentation = Render::Tag.new(true, "Hidden")
modul.hidden = true
spec.hidden = true
when :instance, :singleton, :constant
bad_spec " Conflicting `hide` and `move`." if spec.documentation and spec.hidden.!
spec.documentation = Render::Tag.new(true, "Hidden")
spec.hidden = true
end
nil
end
|