Module: OFlow::HasName
Overview
Adds support for a name attribute and the ability to form full name for a named item.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
The name.
Instance Method Summary collapse
-
#full_name ⇒ String
Similar to a full file path.
-
#init_name(flow, name) ⇒ Object
The containing Flow is used to support the full_name() method otherwise it just sets the name.
Instance Attribute Details
#name ⇒ Object (readonly)
The name.
8 9 10 |
# File 'lib/oflow/hasname.rb', line 8 def name @name end |
Instance Method Details
#full_name ⇒ String
Similar to a full file path. The full_name described the containment of the named item.
22 23 24 25 26 27 28 |
# File 'lib/oflow/hasname.rb', line 22 def full_name() if @flow.respond_to?(:full_name) @flow.full_name() + ':' + @name.to_s else @name.to_s end end |
#init_name(flow, name) ⇒ Object
The containing Flow is used to support the full_name() method otherwise it just sets the name.
14 15 16 17 |
# File 'lib/oflow/hasname.rb', line 14 def init_name(flow, name) @flow = flow @name = name.to_sym end |