Class: Manager::Spec
- Inherits:
-
Object
- Object
- Manager::Spec
- Defined in:
- lib/manager.rb
Instance Attribute Summary collapse
-
#aliases ⇒ Object
Returns the value of attribute aliases.
-
#alts ⇒ Object
Returns the value of attribute alts.
-
#documentation ⇒ Object
Returns the value of attribute documentation.
-
#header ⇒ Object
Returns the value of attribute header.
-
#hidden ⇒ Object
Returns the value of attribute hidden.
-
#i ⇒ Object
readonly
Returns the value of attribute i.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize ⇒ Spec
constructor
A new instance of Spec.
- #missing?(type, module_documentation, module_hidden) ⇒ Boolean
- #order_fix ⇒ Object
- #undocumented_mark ⇒ Object
Constructor Details
#initialize ⇒ Spec
Returns a new instance of Spec.
49 |
# File 'lib/manager.rb', line 49 def initialize; @hidden, @alts, @items = false, {}, [] end |
Instance Attribute Details
#aliases ⇒ Object
Returns the value of attribute aliases.
48 49 50 |
# File 'lib/manager.rb', line 48 def aliases @aliases end |
#alts ⇒ Object
Returns the value of attribute alts.
48 49 50 |
# File 'lib/manager.rb', line 48 def alts @alts end |
#documentation ⇒ Object
Returns the value of attribute documentation.
48 49 50 |
# File 'lib/manager.rb', line 48 def documentation @documentation end |
#header ⇒ Object
Returns the value of attribute header.
48 49 50 |
# File 'lib/manager.rb', line 48 def header @header end |
#hidden ⇒ Object
Returns the value of attribute hidden.
48 49 50 |
# File 'lib/manager.rb', line 48 def hidden @hidden end |
#i ⇒ Object (readonly)
Returns the value of attribute i.
47 48 49 |
# File 'lib/manager.rb', line 47 def i @i end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
47 48 49 |
# File 'lib/manager.rb', line 47 def items @items end |
#type ⇒ Object
Returns the value of attribute type.
48 49 50 |
# File 'lib/manager.rb', line 48 def type @type end |
Instance Method Details
#missing?(type, module_documentation, module_hidden) ⇒ Boolean
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/manager.rb', line 55 def missing? type, module_documentation, module_hidden #! Cannot replace `===` with `kind_of?` because `e` may be a `SanitizedObject`. @type = Render::Tag.new(module_hidden || @hidden, nil, type.to_s) if module_documentation.! and @undocumented @documentation = Render::Tag.new(true, "Undocumented") elsif module_hidden.! and @hidden.! if @items.none?{|e| Manager::UnitTest === e} @items.push(Render::BulletWrapper.new("Missing test", message: "Not unit tested.")) end if @items.none?{|e| Render::UserParagraph === e} @items.push(Render::BulletWrapper .new("Missing Doc", message: "No paragraph given for user.")) elsif @items.none?{|e| Render::MethodSignature === e} case type; when :singleton, :instance @items.push(Render::BulletWrapper .new("Missing Doc", message: "No method signature given.")) end end end end |
#order_fix ⇒ Object
54 |
# File 'lib/manager.rb', line 54 def order_fix; @i = Manager.counts[:spec] += 1 end |
#undocumented_mark ⇒ Object
50 51 52 53 |
# File 'lib/manager.rb', line 50 def undocumented_mark @undocumented = true self end |