Class: SgtnClient::Common::BundleData

Inherits:
Hash
  • Object
show all
Includes:
DataInfo
Defined in:
lib/sgtn-client/common/data.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Attributes included from DataInfo

#last_update

Instance Method Summary collapse

Methods included from DataInfo

age, #expired?

Constructor Details

#initialize(*args, origin: nil, locale: nil, component: nil) ⇒ BundleData

Returns a new instance of BundleData.



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/sgtn-client/common/data.rb', line 55

def initialize(*args, origin: nil, locale: nil, component: nil)
  if !args.empty? && args[0].is_a?(Hash)
    update(args[0])
    super()
  else
    super
  end

  @origin = origin
  @locale = locale
  @component = component
end

Instance Attribute Details

#componentObject (readonly)

Returns the value of attribute component.



53
54
55
# File 'lib/sgtn-client/common/data.rb', line 53

def component
  @component
end

#localeObject (readonly)

Returns the value of attribute locale.



53
54
55
# File 'lib/sgtn-client/common/data.rb', line 53

def locale
  @locale
end

#originObject (readonly)

Returns the value of attribute origin.



53
54
55
# File 'lib/sgtn-client/common/data.rb', line 53

def origin
  @origin
end