Class: Enolib::FieldsetEntry

Inherits:
ValueElementBase show all
Defined in:
lib/enolib/elements/fieldset_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ValueElementBase

#optional_string_value, #optional_value, #required_string_value, #required_value, #value_error

Methods inherited from ElementBase

#comment_error, #error, #initialize, #key, #key_error, #optional_comment, #optional_string_comment, #raw, #required_comment, #required_string_comment, #string_key, #touch

Constructor Details

This class inherits a constructor from Enolib::ElementBase

Instance Attribute Details

#instructionObject (readonly)

TODO: Revisit this hacky exposition



5
6
7
# File 'lib/enolib/elements/fieldset_entry.rb', line 5

def instruction
  @instruction
end

Instance Method Details

#parentObject



7
8
9
# File 'lib/enolib/elements/fieldset_entry.rb', line 7

def parent
  @parent || Fieldset.new(@context, @instruction[:parent])
end

#to_sObject



11
12
13
# File 'lib/enolib/elements/fieldset_entry.rb', line 11

def to_s
  "#<Enolib::FieldsetEntry key=#{@instruction[:key]} value=#{print_value}>"
end