Class: IronNails::View::TimedCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ironnails/view/commands/timed_command.rb

Instance Attribute Summary collapse

Attributes inherited from Command

#action, #callback, #condition, #controller, #mode, #name, #view

Instance Method Summary collapse

Methods inherited from Command

#<=>, #==, #asynchronous?, #attached?, #can_execute?, #changed?, #execute, #has_callback?, #initialize, #refresh_view, #synchronise_viewmodel_with_controller

Methods included from Core::Observable

#add_observer, #count_observers, #delete_observer, #delete_observers, #notify_observers

Methods included from Logging::ClassLogger

#log_on_error, #logger

Constructor Details

This class inherits a constructor from IronNails::View::Command

Instance Attribute Details

#intervalObject

Returns the value of attribute interval.



10
11
12
# File 'lib/ironnails/view/commands/timed_command.rb', line 10

def interval
  @interval
end

#timer_nameObject (readonly)

gets the name to use for the timer



8
9
10
# File 'lib/ironnails/view/commands/timed_command.rb', line 8

def timer_name
  @timer_name
end

Instance Method Details

#nails_base_command_read_optionsObject



12
# File 'lib/ironnails/view/commands/timed_command.rb', line 12

alias_method :nails_base_command_read_options, :read_options

#read_options(options) ⇒ Object



14
15
16
17
18
# File 'lib/ironnails/view/commands/timed_command.rb', line 14

def read_options(options)
  nails_base_command_read_options options

  @timer_name = get_timer_name
end

#start_timerObject

This starts the timer in the view proxy



26
27
28
# File 'lib/ironnails/view/commands/timed_command.rb', line 26

def start_timer
  view.start_timer self
end

#stop_timerObject

This stops the timer in the view proxy



21
22
23
# File 'lib/ironnails/view/commands/timed_command.rb', line 21

def stop_timer
  view.stop_timer self
end