Class: Interdasting::Documentation

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#controllersObject (readonly)

Returns the value of attribute controllers.



7
8
9
# File 'lib/interdasting/documentation.rb', line 7

def controllers
  @controllers
end

#versionObject (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

Returns:

  • (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

#updateObject



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