Class: AzureSTT::Parsers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/azure_stt/parsers/base.rb

Overview

Base class for the parsers

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Base

Initialize the parser

Parameters:

  • hash (Hash)

    The hash containing the information from the API



16
17
18
# File 'lib/azure_stt/parsers/base.rb', line 16

def initialize(hash)
  @hash = hash
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



9
10
11
# File 'lib/azure_stt/parsers/base.rb', line 9

def hash
  @hash
end

Instance Method Details

#attributesHash

Get the attributes parsed to be able to build the model

Returns:

  • (Hash)


25
26
27
# File 'lib/azure_stt/parsers/base.rb', line 25

def attributes
  @attributes ||= build_attributes
end