Class: Interdasting::Documentation
- Inherits:
-
Object
- Object
- Interdasting::Documentation
- Defined in:
- lib/interdasting/documentation.rb,
lib/interdasting/documentation/action.rb,
lib/interdasting/documentation/controller.rb
Defined Under Namespace
Classes: Action, Controller
Instance Attribute Summary collapse
-
#controllers ⇒ Object
readonly
Returns the value of attribute controllers.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(version, controllers_hash) ⇒ Documentation
constructor
A new instance of Documentation.
- #should_update? ⇒ Boolean
- #update ⇒ Object
- #update! ⇒ Object
Constructor Details
#initialize(version, controllers_hash) ⇒ Documentation
Returns a new instance of Documentation.
9 10 11 12 13 14 |
# File 'lib/interdasting/documentation.rb', line 9 def initialize(version, controllers_hash) @version = version @controllers = [] @controllers_in = controllers_hash generate end |
Instance Attribute Details
#controllers ⇒ Object (readonly)
Returns the value of attribute controllers.
7 8 9 |
# File 'lib/interdasting/documentation.rb', line 7 def controllers @controllers end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
6 7 8 |
# File 'lib/interdasting/documentation.rb', line 6 def version @version end |
Instance Method Details
#should_update? ⇒ Boolean
16 17 18 19 20 |
# File 'lib/interdasting/documentation.rb', line 16 def should_update? should_update = false controllers.each { |c| should_update ||= c.should_update? } should_update end |
#update ⇒ Object
22 23 24 25 |
# File 'lib/interdasting/documentation.rb', line 22 def update controllers.each(&:update) self end |
#update! ⇒ Object
27 28 29 30 |
# File 'lib/interdasting/documentation.rb', line 27 def update! controllers.each(&:update!) self end |