Class: ActiveMocker::ModelSchema::Methods

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mocker/model_schema.rb

Defined Under Namespace

Classes: Arguments

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, arguments:, type:, proc: nil) ⇒ Methods

Returns a new instance of Methods.



242
243
244
245
246
247
248
249
250
251
# File 'lib/active_mocker/model_schema.rb', line 242

def initialize( name:,
                arguments:,
                type:,
                proc: nil
              )
  @name      = name
  @arguments = Arguments.new(arguments)
  @type      = type
  @proc      = proc
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



240
241
242
# File 'lib/active_mocker/model_schema.rb', line 240

def arguments
  @arguments
end

#nameObject (readonly)

Returns the value of attribute name.



240
241
242
# File 'lib/active_mocker/model_schema.rb', line 240

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



240
241
242
# File 'lib/active_mocker/model_schema.rb', line 240

def type
  @type
end

Instance Method Details

#to_hashObject



253
254
255
# File 'lib/active_mocker/model_schema.rb', line 253

def to_hash
  {"name" => name, "arguments" => arguments, "type" => type}
end