Class: CardanoExplorer::Base
- Inherits:
-
Object
- Object
- CardanoExplorer::Base
- Defined in:
- lib/cardano_explorer/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash = nil) ⇒ Base
constructor
A new instance of Base.
- #summary ⇒ Object
Constructor Details
#initialize(hash = nil) ⇒ Base
Returns a new instance of Base.
9 10 11 |
# File 'lib/cardano_explorer/base.rb', line 9 def initialize(hash = nil) @hash = hash end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
3 4 5 |
# File 'lib/cardano_explorer/base.rb', line 3 def hash @hash end |
Class Method Details
.find(hash) ⇒ Object
5 6 7 |
# File 'lib/cardano_explorer/base.rb', line 5 def self.find(hash) new hash end |
Instance Method Details
#summary ⇒ Object
13 14 15 16 |
# File 'lib/cardano_explorer/base.rb', line 13 def summary @summary ||= self.class.get "summary/#{hash}" @summary.parsed_response['Right'] end |