Class: Cucumber::Messages::JavaMethod

Inherits:
Message show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Message::Utils

included

Methods included from Message::Serialization

#to_h, #to_json

Methods included from Message::Deserialization

included

Constructor Details

#initialize(class_name: '', method_name: '', method_parameter_types: []) ⇒ JavaMethod

Returns a new instance of JavaMethod.



1383
1384
1385
1386
1387
1388
1389
1390
1391
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1383

def initialize(
  class_name: '',
  method_name: '',
  method_parameter_types: []
)
  @class_name = class_name
  @method_name = method_name
  @method_parameter_types = method_parameter_types
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



1377
1378
1379
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1377

def class_name
  @class_name
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



1379
1380
1381
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1379

def method_name
  @method_name
end

#method_parameter_typesObject (readonly)

Returns the value of attribute method_parameter_types.



1381
1382
1383
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1381

def method_parameter_types
  @method_parameter_types
end

Class Method Details

.from_h(hash) ⇒ Object

Returns a new JavaMethod from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::JavaMethod.from_h(some_hash) # => #<Cucumber::Messages::JavaMethod:0x... ...>


817
818
819
820
821
822
823
824
825
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 817

def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    class_name: hash[:className],
    method_name: hash[:methodName],
    method_parameter_types: hash[:methodParameterTypes],
  )
end