Class: Gedcomx::FieldValue
- Inherits:
-
Object
- Object
- Gedcomx::FieldValue
- Defined in:
- lib/gedcomx/field_value.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(input = nil) ⇒ FieldValue
constructor
A new instance of FieldValue.
- #text ⇒ Object
- #text=(input_string) ⇒ Object
- #to_java ⇒ Object
- #type ⇒ Object
- #type=(input_type) ⇒ Object
Constructor Details
#initialize(input = nil) ⇒ FieldValue
Returns a new instance of FieldValue.
8 9 10 |
# File 'lib/gedcomx/field_value.rb', line 8 def initialize(input = nil) @value = input || self.class.java_class.new end |
Class Method Details
.java_class ⇒ Object
4 5 6 |
# File 'lib/gedcomx/field_value.rb', line 4 def self.java_class Java::OrgGedcomxRecords::FieldValue end |
Instance Method Details
#text ⇒ Object
12 13 14 |
# File 'lib/gedcomx/field_value.rb', line 12 def text @value.get_text end |
#text=(input_string) ⇒ Object
16 17 18 |
# File 'lib/gedcomx/field_value.rb', line 16 def text=(input_string) @value.text= input_string end |
#to_java ⇒ Object
28 29 30 |
# File 'lib/gedcomx/field_value.rb', line 28 def to_java @value end |
#type ⇒ Object
20 21 22 |
# File 'lib/gedcomx/field_value.rb', line 20 def type @value.get_type.to_s end |
#type=(input_type) ⇒ Object
24 25 26 |
# File 'lib/gedcomx/field_value.rb', line 24 def type= (input_type) @value.type = ( input_type.is_a? Gedcomx.java_uri_class ) ? input_type : Gedcomx.new_uri(input_type) end |