Class: PopCap::UnformattedHash
- Inherits:
-
Object
- Object
- PopCap::UnformattedHash
- Defined in:
- lib/pop_cap/unformatted_hash.rb
Overview
Public: This class formats the JSON output of TagReader.
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Class Method Summary collapse
-
.hash(json) ⇒ Object
Public: This method wraps #new & #hash.
Instance Method Summary collapse
-
#hash ⇒ Object
Public: This method returns a Ruby hash.
-
#initialize(json) ⇒ UnformattedHash
constructor
A new instance of UnformattedHash.
Constructor Details
#initialize(json) ⇒ UnformattedHash
Returns a new instance of UnformattedHash.
9 10 11 |
# File 'lib/pop_cap/unformatted_hash.rb', line 9 def initialize(json) @json = json end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
7 8 9 |
# File 'lib/pop_cap/unformatted_hash.rb', line 7 def json @json end |
Class Method Details
.hash(json) ⇒ Object
Public: This method wraps #new & #hash.
22 23 24 |
# File 'lib/pop_cap/unformatted_hash.rb', line 22 def self.hash(json) new(json).hash end |
Instance Method Details
#hash ⇒ Object
Public: This method returns a Ruby hash. The keys have been converted to symbols.
16 17 18 |
# File 'lib/pop_cap/unformatted_hash.rb', line 16 def hash renamed_hash end |