Class: TC_JSONRails::A
- Defined in:
- lib/crazy_ivan/vendor/json-1.1.7/tests/test_json_rails.rb
Instance Attribute Summary collapse
-
#a ⇒ Object
readonly
Returns the value of attribute a.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(a) ⇒ A
constructor
A new instance of A.
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(a) ⇒ A
Returns a new instance of A.
17 18 19 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/tests/test_json_rails.rb', line 17 def initialize(a) @a = a end |
Instance Attribute Details
#a ⇒ Object (readonly)
Returns the value of attribute a.
21 22 23 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/tests/test_json_rails.rb', line 21 def a @a end |
Class Method Details
.json_create(object) ⇒ Object
27 28 29 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/tests/test_json_rails.rb', line 27 def self.json_create(object) new(*object['args']) end |
Instance Method Details
#==(other) ⇒ Object
23 24 25 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/tests/test_json_rails.rb', line 23 def ==(other) a == other.a end |
#to_json(*args) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/tests/test_json_rails.rb', line 31 def to_json(*args) { 'json_class' => self.class.name, 'args' => [ @a ], }.to_json(*args) end |