Class: AdequateCryptoAddress::Xmr
- Inherits:
-
Object
- Object
- AdequateCryptoAddress::Xmr
- Defined in:
- lib/adequate_crypto_address/xmr.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(address) ⇒ Xmr
constructor
A new instance of Xmr.
- #valid?(type = nil) ⇒ Boolean
Constructor Details
#initialize(address) ⇒ Xmr
Returns a new instance of Xmr.
7 8 9 10 |
# File 'lib/adequate_crypto_address/xmr.rb', line 7 def initialize(address) @address = address @type = address_type end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
5 6 7 |
# File 'lib/adequate_crypto_address/xmr.rb', line 5 def address @address end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/adequate_crypto_address/xmr.rb', line 5 def type @type end |
Instance Method Details
#valid?(type = nil) ⇒ Boolean
12 13 14 15 16 17 18 |
# File 'lib/adequate_crypto_address/xmr.rb', line 12 def valid?(type = nil) if type address_type == type.to_sym else !address_type.nil? end end |