Class: Gamefic::Sdk::Debug::Action
- Inherits:
-
Action
- Object
- Action
- Gamefic::Sdk::Debug::Action
- Defined in:
- lib/gamefic-sdk/debug/action.rb
Instance Attribute Summary collapse
-
#source_location ⇒ Object
readonly
Returns the value of attribute source_location.
Instance Method Summary collapse
- #execute(*args) ⇒ Object
- #executed? ⇒ Boolean
-
#initialize(command, *queries, &proc) ⇒ Action
constructor
A new instance of Action.
- #standard? ⇒ Boolean
Constructor Details
#initialize(command, *queries, &proc) ⇒ Action
Returns a new instance of Action.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/gamefic-sdk/debug/action.rb', line 7 def initialize(command, *queries, &proc) super @executed = false caller.each { |c| if c.end_with?(":in `stage'") @source_location = c[0..-12] break end } end |
Instance Attribute Details
#source_location ⇒ Object (readonly)
Returns the value of attribute source_location.
6 7 8 |
# File 'lib/gamefic-sdk/debug/action.rb', line 6 def source_location @source_location end |
Instance Method Details
#execute(*args) ⇒ Object
17 18 19 20 |
# File 'lib/gamefic-sdk/debug/action.rb', line 17 def execute *args super @executed = true end |
#executed? ⇒ Boolean
21 22 23 |
# File 'lib/gamefic-sdk/debug/action.rb', line 21 def executed? @executed end |
#standard? ⇒ Boolean
24 25 26 27 |
# File 'lib/gamefic-sdk/debug/action.rb', line 24 def standard? return false if source_location.nil? source_location.start_with?(Gamefic::Sdk::GLOBAL_IMPORT_PATH) end |