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.
11 12 13 14 15 |
# File 'lib/capybara/poltergeist/command.rb', line 11 def initialize(name, *args) @id = SecureRandom.uuid @name = name @args = args end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
9 10 11 |
# File 'lib/capybara/poltergeist/command.rb', line 9 def args @args end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/capybara/poltergeist/command.rb', line 7 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/capybara/poltergeist/command.rb', line 8 def name @name end |
Instance Method Details
#message ⇒ Object
17 18 19 |
# File 'lib/capybara/poltergeist/command.rb', line 17 def JSON.dump({ 'id' => @id, 'name' => @name, 'args' => @args }) end |