Class: Towsta::Kinds::ListKind
Instance Attribute Summary
Attributes inherited from MainKind
#content
Instance Method Summary
collapse
Methods inherited from MainKind
#compare_parameterized, #get, #initialize, #kind
Instance Method Details
#compare(object) ⇒ Object
11
12
13
14
|
# File 'lib/towsta/kinds/list.rb', line 11
def compare object
return @content.include? object if object.class == String
@content == object
end
|
#export ⇒ Object
16
17
18
|
# File 'lib/towsta/kinds/list.rb', line 16
def export
@content.join(', ')
end
|
#set(content) ⇒ Object
6
7
8
9
|
# File 'lib/towsta/kinds/list.rb', line 6
def set content
return @content = content.join(', ').split(', ') if content.class == Array
@content = content.to_s.split(', ')
end
|