Class: Superbot::Capybara::Convert
- Inherits:
-
Object
- Object
- Superbot::Capybara::Convert
- Defined in:
- lib/superbot/capybara/convert.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
Returns the value of attribute json.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(json) ⇒ Convert
constructor
A new instance of Convert.
Constructor Details
#initialize(json) ⇒ Convert
Returns a new instance of Convert.
6 7 8 |
# File 'lib/superbot/capybara/convert.rb', line 6 def initialize(json) @json = JSON.parse(json, symbolize_names: true) end |
Instance Attribute Details
#json ⇒ Object
Returns the value of attribute json.
18 19 20 |
# File 'lib/superbot/capybara/convert.rb', line 18 def json @json end |
Class Method Details
.call(json) ⇒ Object
10 11 12 |
# File 'lib/superbot/capybara/convert.rb', line 10 def self.call(json) new(json).call end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/superbot/capybara/convert.rb', line 14 def call converted_json end |