Class: SgtnClient::Common::BundleID
- Inherits:
-
Object
- Object
- SgtnClient::Common::BundleID
- Defined in:
- lib/sgtn-client/common/data.rb
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.
9 10 11 12 13 |
# File 'lib/sgtn-client/common/data.rb', line 9 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.
7 8 9 |
# File 'lib/sgtn-client/common/data.rb', line 7 def component @component end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
7 8 9 |
# File 'lib/sgtn-client/common/data.rb', line 7 def locale @locale end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
19 20 21 |
# File 'lib/sgtn-client/common/data.rb', line 19 def ==(other) (other.is_a? self.class) && @locale == other.locale && @component == other.component end |
#hash ⇒ Object
15 16 17 |
# File 'lib/sgtn-client/common/data.rb', line 15 def hash @key end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/sgtn-client/common/data.rb', line 25 def to_s "locale=#{@locale}, component=#{@component}}" end |