Module: Faalis::Generators::Concerns::Child

Included in:
DashboardScaffold
Defined in:
lib/faalis/generators/concerns/child.rb

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) child? (private)

check for child

Returns:

  • (Boolean)


10
11
12
13
14
15
# File 'lib/faalis/generators/concerns/child.rb', line 10

def child?
  if resource_data.include? 'childs'
    return true unless resource_data['childs'].nil?
  end
  false
end

- (Object) childs (private)

Return an array of resource childs



19
20
21
22
23
24
25
# File 'lib/faalis/generators/concerns/child.rb', line 19

def childs
  if child?
    resource_data['childs']
  else
    []
  end
end