Class: SgtnClient::Common::BundleID
- Inherits:
-
Object
- Object
- SgtnClient::Common::BundleID
- Defined in:
- lib/sgtn-client/common/data.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#component ⇒ Object
readonly
Returns the value of attribute component.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(component, locale) ⇒ BundleID
constructor
A new instance of BundleID.
- #to_s ⇒ Object
Constructor Details
#initialize(component, locale) ⇒ BundleID
Returns a new instance of BundleID.
12 13 14 15 16 |
# File 'lib/sgtn-client/common/data.rb', line 12 def initialize(component, locale) @locale = locale @component = component @key = [@component, @locale].hash end |
Instance Attribute Details
#component ⇒ Object (readonly)
Returns the value of attribute component.
10 11 12 |
# File 'lib/sgtn-client/common/data.rb', line 10 def component @component end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
10 11 12 |
# File 'lib/sgtn-client/common/data.rb', line 10 def locale @locale end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
22 23 24 |
# File 'lib/sgtn-client/common/data.rb', line 22 def ==(other) (other.is_a? self.class) && @locale == other.locale && @component == other.component end |
#hash ⇒ Object
18 19 20 |
# File 'lib/sgtn-client/common/data.rb', line 18 def hash @key end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/sgtn-client/common/data.rb', line 28 def to_s "{component: #{@component}, locale: #{@locale}}" end |