Class: Frap::CreateResource

Inherits:
Object
  • Object
show all
Defined in:
lib/frap/create_resource.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options) ⇒ CreateResource

Returns a new instance of CreateResource.



7
8
9
10
# File 'lib/frap/create_resource.rb', line 7

def initialize(name, options)
  @name = name
  @options = options
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



5
6
7
# File 'lib/frap/create_resource.rb', line 5

def attributes
  @attributes
end

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/frap/create_resource.rb', line 5

def name
  @name
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/frap/create_resource.rb', line 5

def options
  @options
end

Instance Method Details

#create_resourceObject



12
13
14
15
# File 'lib/frap/create_resource.rb', line 12

def create_resource
  generate_rails_resource if options['rails']
  generate_flutter_resource if options['flutter']
end