Class: Mida::DataType::Generic
- Inherits:
-
BlankSlate
- Object
- BlankSlate
- Mida::DataType::Generic
- Defined in:
- lib/mida_vocabulary/datatype/generic.rb
Overview
The base DataType Parser
Direct Known Subclasses
Boolean, Enumeration, Float, ISO8601Date, Integer, Number, Text, Time, URL
Class Method Summary collapse
-
.parse(value) ⇒ Object
Convenience method, same as
new
.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #method_missing(name, *args, &block) ⇒ Object
- #to_s ⇒ Object
- #to_yaml(options = {}) ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
14 15 16 |
# File 'lib/mida_vocabulary/datatype/generic.rb', line 14 def method_missing(name, *args, &block) @parsedValue.send(name, *args, &block) end |
Class Method Details
.parse(value) ⇒ Object
Convenience method, same as new
10 11 12 |
# File 'lib/mida_vocabulary/datatype/generic.rb', line 10 def self.parse(value) self.new(value) end |
Instance Method Details
#==(other) ⇒ Object
26 27 28 |
# File 'lib/mida_vocabulary/datatype/generic.rb', line 26 def ==(other) @parsedValue.to_s.downcase == other.to_s.downcase end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/mida_vocabulary/datatype/generic.rb', line 18 def to_s @parsedValue.to_s end |
#to_yaml(options = {}) ⇒ Object
22 23 24 |
# File 'lib/mida_vocabulary/datatype/generic.rb', line 22 def to_yaml(={}) to_s.to_yaml() end |