Class: Baykit::BayServer::Bcf::BcfElement
- Defined in:
- lib/baykit/bayserver/bcf/bcf_element.rb
Instance Attribute Summary collapse
-
#arg ⇒ Object
readonly
Returns the value of attribute arg.
-
#content_list ⇒ Object
readonly
Returns the value of attribute content_list.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from BcfObject
Instance Method Summary collapse
- #get_value(key) ⇒ Object
-
#initialize(name, arg, file_name, line_no) ⇒ BcfElement
constructor
A new instance of BcfElement.
Constructor Details
#initialize(name, arg, file_name, line_no) ⇒ BcfElement
Returns a new instance of BcfElement.
12 13 14 15 16 17 |
# File 'lib/baykit/bayserver/bcf/bcf_element.rb', line 12 def initialize(name, arg, file_name, line_no) super file_name, line_no @name = name @arg = arg @content_list = [] end |
Instance Attribute Details
#arg ⇒ Object (readonly)
Returns the value of attribute arg.
9 10 11 |
# File 'lib/baykit/bayserver/bcf/bcf_element.rb', line 9 def arg @arg end |
#content_list ⇒ Object (readonly)
Returns the value of attribute content_list.
10 11 12 |
# File 'lib/baykit/bayserver/bcf/bcf_element.rb', line 10 def content_list @content_list end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/baykit/bayserver/bcf/bcf_element.rb', line 8 def name @name end |
Instance Method Details
#get_value(key) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/baykit/bayserver/bcf/bcf_element.rb', line 19 def get_value(key) content_list.each do |o| if o.instance_of?(BcfKeyVal) && o.key.casecmp?(key) return o.value end end nil end |