Class: Capybara::Poltergeist::Command
- Inherits:
-
Object
- Object
- Capybara::Poltergeist::Command
- Defined in:
- lib/capybara/poltergeist/command.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, *args) ⇒ Command
constructor
A new instance of Command.
- #message ⇒ Object
Constructor Details
#initialize(name, *args) ⇒ Command
Returns a new instance of Command.
9 10 11 12 13 |
# File 'lib/capybara/poltergeist/command.rb', line 9 def initialize(name, *args) @id = SecureRandom.uuid @name = name @args = args end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
7 8 9 |
# File 'lib/capybara/poltergeist/command.rb', line 7 def args @args end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/capybara/poltergeist/command.rb', line 5 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/capybara/poltergeist/command.rb', line 6 def name @name end |
Instance Method Details
#message ⇒ Object
15 16 17 |
# File 'lib/capybara/poltergeist/command.rb', line 15 def JSON.dump({ 'id' => @id, 'name' => @name, 'args' => @args }) end |