Module: EDN::Metadata
- Defined in:
- lib/edn/metadata.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/edn/metadata.rb', line 10 def @metadata end |
Class Method Details
.extended(base) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/edn/metadata.rb', line 3 def self.extended(base) base.instance_eval do alias :to_edn_without_metadata :to_edn alias :to_edn :to_edn_with_metadata end end |
Instance Method Details
#has_metadata? ⇒ Boolean
12 13 14 15 16 17 |
# File 'lib/edn/metadata.rb', line 12 def respond_to?(:allows_metadata?) and and !.nil? and !.empty? end |
#to_edn_with_metadata ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/edn/metadata.rb', line 19 def if '^' + .to_edn + ' ' + else end end |